Results 1 to 9 of 9

Thread: Need Help** Urgent

  1. #1
    Join Date
    May 2007
    Posts
    23
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Post Need Help** Urgent

    hi people how are you all? ok this is the original script excutes like this
    Code:
    player.php?urls=<URL1.FLV>,<URL2.FLV>
    PHP Code:
    <?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
    Code:
    /?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%2F020064070147304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070247304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070347304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070447304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070547304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070647304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697&type=flv
    Code:
    //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
    Code:
    { 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
    Code:
    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
    Code:
                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
    Code:
    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
    Last edited by dj30324; 11-05-2008 at 06:54 PM.

  2. #2
    Join Date
    Jul 2006
    Posts
    497
    Thanks
    8
    Thanked 70 Times in 70 Posts

    Default

    Umm... Would you mind telling us what this script accomplishes? Also, what are the contents of index.php?
    -- Chris
    informal JavaScript student of Douglas Crockford
    I like wikis - a lot.

  3. The Following User Says Thank You to Jesdisciple For This Useful Post:

    dj30324 (11-07-2008)

  4. #3
    Join Date
    May 2007
    Posts
    23
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    plays the playlist flash player but you when the this code is executed
    here like url
    Code:
    player.php?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%2F020064070147304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070247304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070347304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070447304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070547304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070647304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697&type=flv
    after the it is executed, in the view source it only shows this
    below is the javscript for the player
    Code:
     playList: [
                    { url: 'video/0' },
                    { url: 'video/1' },
                    { url: 'video/2' },
                    { url: 'video/3' },
                    { url: 'video/4' },
                    { url: 'video/5' },
                    { url: 'video/6' },
    ]}});
    but this code only works with firefox browser, and doesnt work with any other so to make it work i want to change and start displaying the url rather then video/0 etc etc.
    and i want to make it so when you want to view source the code it would look like this
    Code:
    playList: [
    { url: 'http://f.youku.com/player/getFlvPath/sid/00_00/st/flv/fileid/020064070047304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B?K=0dd9fa5b31ca21b214f9697 },
    
    ]}});
    so i need help to change the code look above for details. i hope every 1 understands and could help me modify this code to make it work thank you so much.

  5. #4
    Join Date
    Jul 2006
    Posts
    497
    Thanks
    8
    Thanked 70 Times in 70 Posts

    Default

    Try this for loop instead of the current one.
    PHP Code:
    for ($i=0;$i<count($_SESSION["flv"]);$i++){
      echo 
    "\t\t\t\t{ url: '{$_SESSION['flv'][$i]}' },\n";
    }; 
    -- Chris
    informal JavaScript student of Douglas Crockford
    I like wikis - a lot.

  6. #5
    Join Date
    May 2007
    Posts
    23
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    thanks you so much for helping, i guess it was mistake on my part
    but i if it was this address of
    Code:
    player.php?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%2F020064070147304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070247304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070347304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070447304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070547304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697%2Chttp%3A%2F%2Ff.youku.com%2Fplayer%2FgetFlvPath%2Fsid%2F00_00%2Fst%2Fflv%2Ffileid%2F020064070647304AC7BE9200482720475F1254-A1C7-41D3-F7BC-5A9D0B9B6C4B%3FK%3D0dd9fa5b31ca21b214f9697&type=flv
    it should display this below on the view source i did try your script, it works for only 1, nt multiple , it how it should look for multiple urls calls on
    Code:
    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' },
    ]}});
    i did modify the port of the script and i tried this
    Code:
    for ($i=t+t+t+t;$i<count($_SESSION["flv"]);$i++){
      echo "{ url: '{$_SESSION['flv'][$i]}' },\n";
    };
    it didnt work and if its a single flv url then it should play single, but if the url is multiple url then the script should play multiple . , thank you again , any help you can give will greatly be appriciated.!! thanks in advance
    Last edited by dj30324; 11-06-2008 at 09:58 PM.

  7. #6
    Join Date
    Jul 2006
    Posts
    497
    Thanks
    8
    Thanked 70 Times in 70 Posts

    Default

    Code:
    $i=t+t+t+t;
    That will first look for the constant 't' and multiply it by 4. If the constant isn't defined (which it isn't, as far as I know), the string 't' will be multiplied by 4 instead. That doesn't make sense, and that's a reason that the script doesn't work. It should be this instead:
    Code:
    $i=0;
    -- Chris
    informal JavaScript student of Douglas Crockford
    I like wikis - a lot.

  8. The Following User Says Thank You to Jesdisciple For This Useful Post:

    dj30324 (11-07-2008)

  9. #7
    Join Date
    May 2007
    Posts
    23
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    bro i did used your script it does work , but only plays single
    this is your script
    Code:
    for ($i=0;$i<count($_SESSION["flv"]);$i++){
      echo "\t\t\t\t{ url: '{$_SESSION['flv'][$i]}' },\n";
    };
    i would like the script to play multiple files when the multiple urls are called,display multiple url on the view source, as i explained above , could you help me , thanks you in advance . thanks again for taking time, .

  10. #8
    Join Date
    Jul 2006
    Posts
    497
    Thanks
    8
    Thanked 70 Times in 70 Posts

    Default

    I ran the script on my home server and found all 7 URLs in the page's source.
    Code:
    <?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: '{$_SESSION['flv'][$i]}' },\n";
    };
    echo("]}});
    </script>    
    </head>
    <body TOPMARGIN=\"0\" LEFTMARGIN=\"0\" MARGINWIDTH=\"0\" MARGINHEIGHT=\"0\" hspace=\"0\" vspace=\"0\">
    <div id=\"flowplayer\"></div>
    </body>
    </html>");
    };
    ?>
    -- Chris
    informal JavaScript student of Douglas Crockford
    I like wikis - a lot.

  11. The Following User Says Thank You to Jesdisciple For This Useful Post:

    dj30324 (11-07-2008)

  12. #9
    Join Date
    May 2007
    Posts
    23
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    yea bro it works fine thanks again, works fine on other server freehostia other free php site except for this stupid site http://www.000webhost.com/91000.html this site is stupid any way,

    Chris Bro thanks you so much for your help, thank you ! very much for your time . thats the end

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •