dj30324
11-05-2008, 06:48 PM
hi people how are you all? ok this is the original script excutes like this
player.php?urls=<URL1.FLV>,<URL2.FLV>
<?php
//player.php
session_start();
$_SESSION["flv"]=explode(",",$_GET["urls"]);
if ((strstr($_GET["urls"],"divx"))||(strstr($_GET["urls"],".avi"))){
$_SESSION["divx"]=true;
echo("<html>
<head></head>
<body TOPMARGIN=\"0\" LEFTMARGIN=\"0\" MARGINWIDTH=\"0\" MARGINHEIGHT=\"0\" hspace=\"0\" vspace=\"0\">
<object classid=\"clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616\" codebase=\"http://go.divx.com/plugin/DivXBrowserPlugin.cab\" width=\"500\" height=\"400\">
<param name=\"custommode\" value=\"none\">
<param name=\"autoPlay\" value=\"true\">
<param name=\"src\" value=\"video.php/0&".session_name()."=".session_id()."\">
<embed type=\"video/divx\" src=\"video/0&".session_name()."=".session_id()."\" custommode=\"none\" autoplay=\"true\" pluginspage=\"http://go.divx.com/plugin/download/\" width=\"500\" height=\"400\">
</object>
</body>
</html>
");
}
else {
echo ("<html>
<head>
<title>flowplayer</title>
<script type=\"text/javascript\" src=\"flashembed.min.js\"></script>
<script>
flashembed(\"flowplayer\", {src:'FlowPlayerDark2.2.swf',width: 500, height: 400},
{config: {
menuItems: [true, true, true, true, true, false, false],
showMenu: false,
loop: false,
autoPlay: false,
autoBuffering: true,
initialScale: 'fit',
bufferBarColor1: '0x550000',
bufferBarColor2: '0xEE0000',
playList: [\n");
for ($i=0;$i<count($_SESSION["flv"]);$i++){
echo "\t\t\t\t{ url: 'video/$i' },\n";
};
echo("]}});
</script>
</head>
<body TOPMARGIN=\"0\" LEFTMARGIN=\"0\" MARGINWIDTH=\"0\" MARGINHEIGHT=\"0\" hspace=\"0\" vspace=\"0\">
<div id=\"flowplayer\"></div>
</body>
</html>");
};
?>
when the flv is executed in a playlist style in
/?urls=http%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070047304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070147304AC7BE920048272047 5F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070247304AC7BE920048272047 5F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070347304AC7BE920048272047 5F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070447304AC7BE920048272047 5F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070547304AC7BE920048272047 5F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070647304AC7BE920048272047 5F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697&type=flv
//play it showes like this on view source
playList: [
{ url: 'video/0' },
{ url: 'video/1' },
{ url: 'video/2' },
{ url: 'video/3' },
{ url: 'video/4' },
{ url: 'video/5' },
{ url: 'video/6' },
]}});
playlist is like this shows above but i want to excute it rather then displaying this
{ url: 'video/0' },
after it executes i wanted to display the url
playList: [
{ url: 'http://f.youku.com/player/getFlvPath/sid/00_00/st/flv/fileid/020064070047304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B?K=0dd9fa5b31ca21b214f9697 },
{ url: 'http://f.youku.com/player/getFlvPath/sid/00_00/st/flv/fileid/020064070047304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B?K=0dd9fa5b31ca21b214f9697' },
{ url: 'http://f.youku.com/player/getFlvPath/sid/00_00/st/flv/fileid/020064070047304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B?K=0dd9fa5b31ca21b214f9697' },
{ url: 'http://f.youku.com/player/getFlvPath/sid/00_00/st/flv/fileid/020064070047304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B?K=0dd9fa5b31ca21b214f9697' },
{ url: 'http://f.youku.com/player/getFlvPath/sid/00_00/st/flv/fileid/020064070047304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B?K=0dd9fa5b31ca21b214f9697' },
{ url: 'http://f.youku.com/player/getFlvPath/sid/00_00/st/flv/fileid/020064070047304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B?K=0dd9fa5b31ca21b214f9697' },
{ url: 'http://f.youku.com/player/getFlvPath/sid/00_00/st/flv/fileid/020064070047304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B?K=0dd9fa5b31ca21b214f9697' },
]}});
on the view source so it can play on all browser rather then only Firefox.
php source for that code that excutes is
playList: [\n");
for ($i=0;$i<count($_SESSION["flv"]);$i++){
echo "\t\t\t\t{ url: 'video/$i' },\n";
};
echo("]}});
i gave it a try
playList: [\n");
$i = $_GET["urls"];
for ($i=0;$i<count($_SESSION["flv"]);$i++){
echo "\t\t\t\t{ url: '$i' },\n";
};
echo("]}});
but i failed i get error like
Parse error: syntax error, unexpected T_FOR in /home/a1182391/public_html/nabber/player/index.php on line 42
next 1 i fix and the random playlist display does not show up
help me plz again this is not my code. i am new in php
player.php?urls=<URL1.FLV>,<URL2.FLV>
<?php
//player.php
session_start();
$_SESSION["flv"]=explode(",",$_GET["urls"]);
if ((strstr($_GET["urls"],"divx"))||(strstr($_GET["urls"],".avi"))){
$_SESSION["divx"]=true;
echo("<html>
<head></head>
<body TOPMARGIN=\"0\" LEFTMARGIN=\"0\" MARGINWIDTH=\"0\" MARGINHEIGHT=\"0\" hspace=\"0\" vspace=\"0\">
<object classid=\"clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616\" codebase=\"http://go.divx.com/plugin/DivXBrowserPlugin.cab\" width=\"500\" height=\"400\">
<param name=\"custommode\" value=\"none\">
<param name=\"autoPlay\" value=\"true\">
<param name=\"src\" value=\"video.php/0&".session_name()."=".session_id()."\">
<embed type=\"video/divx\" src=\"video/0&".session_name()."=".session_id()."\" custommode=\"none\" autoplay=\"true\" pluginspage=\"http://go.divx.com/plugin/download/\" width=\"500\" height=\"400\">
</object>
</body>
</html>
");
}
else {
echo ("<html>
<head>
<title>flowplayer</title>
<script type=\"text/javascript\" src=\"flashembed.min.js\"></script>
<script>
flashembed(\"flowplayer\", {src:'FlowPlayerDark2.2.swf',width: 500, height: 400},
{config: {
menuItems: [true, true, true, true, true, false, false],
showMenu: false,
loop: false,
autoPlay: false,
autoBuffering: true,
initialScale: 'fit',
bufferBarColor1: '0x550000',
bufferBarColor2: '0xEE0000',
playList: [\n");
for ($i=0;$i<count($_SESSION["flv"]);$i++){
echo "\t\t\t\t{ url: 'video/$i' },\n";
};
echo("]}});
</script>
</head>
<body TOPMARGIN=\"0\" LEFTMARGIN=\"0\" MARGINWIDTH=\"0\" MARGINHEIGHT=\"0\" hspace=\"0\" vspace=\"0\">
<div id=\"flowplayer\"></div>
</body>
</html>");
};
?>
when the flv is executed in a playlist style in
/?urls=http%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070047304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070147304AC7BE920048272047 5F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070247304AC7BE920048272047 5F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070347304AC7BE920048272047 5F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070447304AC7BE920048272047 5F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070547304AC7BE920048272047 5F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070647304AC7BE920048272047 5F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697&type=flv
//play it showes like this on view source
playList: [
{ url: 'video/0' },
{ url: 'video/1' },
{ url: 'video/2' },
{ url: 'video/3' },
{ url: 'video/4' },
{ url: 'video/5' },
{ url: 'video/6' },
]}});
playlist is like this shows above but i want to excute it rather then displaying this
{ url: 'video/0' },
after it executes i wanted to display the url
playList: [
{ url: 'http://f.youku.com/player/getFlvPath/sid/00_00/st/flv/fileid/020064070047304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B?K=0dd9fa5b31ca21b214f9697 },
{ url: 'http://f.youku.com/player/getFlvPath/sid/00_00/st/flv/fileid/020064070047304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B?K=0dd9fa5b31ca21b214f9697' },
{ url: 'http://f.youku.com/player/getFlvPath/sid/00_00/st/flv/fileid/020064070047304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B?K=0dd9fa5b31ca21b214f9697' },
{ url: 'http://f.youku.com/player/getFlvPath/sid/00_00/st/flv/fileid/020064070047304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B?K=0dd9fa5b31ca21b214f9697' },
{ url: 'http://f.youku.com/player/getFlvPath/sid/00_00/st/flv/fileid/020064070047304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B?K=0dd9fa5b31ca21b214f9697' },
{ url: 'http://f.youku.com/player/getFlvPath/sid/00_00/st/flv/fileid/020064070047304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B?K=0dd9fa5b31ca21b214f9697' },
{ url: 'http://f.youku.com/player/getFlvPath/sid/00_00/st/flv/fileid/020064070047304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B?K=0dd9fa5b31ca21b214f9697' },
]}});
on the view source so it can play on all browser rather then only Firefox.
php source for that code that excutes is
playList: [\n");
for ($i=0;$i<count($_SESSION["flv"]);$i++){
echo "\t\t\t\t{ url: 'video/$i' },\n";
};
echo("]}});
i gave it a try
playList: [\n");
$i = $_GET["urls"];
for ($i=0;$i<count($_SESSION["flv"]);$i++){
echo "\t\t\t\t{ url: '$i' },\n";
};
echo("]}});
but i failed i get error like
Parse error: syntax error, unexpected T_FOR in /home/a1182391/public_html/nabber/player/index.php on line 42
next 1 i fix and the random playlist display does not show up
help me plz again this is not my code. i am new in php