Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Youtube

  1. #1
    Regular Coder
    Join Date
    Mar 2007
    Location
    UK
    Posts
    151
    Thanks
    9
    Thanked 2 Times in 2 Posts

    Youtube

    I know ive posted something like this before but ive got closer to doing it , still a little hitch.
    Ive made a form where you put in the last part of a youtube address e.g. s-XgyEpArVI. This forms action then goes to a page where the video displays but when you get to that page and right click where the embeded flash movie is it says "Movie Not Loaded...". Here is the code for the handling document
    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Add Youtube Video</title>
    </head>

    <body><?php
    $url 
    = ($_REQUEST ['url']);
    //echo('youtube', '<img', "/\\(:youtube (.*?)\\s*:\\)/e", "ShowYouTube('$1')");

    ?>

    <object type='application/x-shockwave-flash' style='width:425px; height:350px; data='http://www.youtube.com/v/<?php echo $url;?>'>
    <param name='wmode' value='transparent' />
    <param name='movie' value='http://www.youtube.com/v/<?php echo $url;?>' />
    </object>

    </body>
    </html>
    ive even checked the source code to see if address to the movie is right and heres the source code:
    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <
    html xmlns="http://www.w3.org/1999/xhtml">
    <
    head>
    <
    meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <
    title>Add Youtube Video</title>
    </
    head>

    <
    body>
    <
    object type='application/x-shockwave-flash' style='width:425px; height:350px; data='http://www.youtube.com/v/ejLtDJ5V-9g'>
    <param name='wmode' value='transparent' />
    <
    param name='movie' value='http://www.youtube.com/v/ejLtDJ5V-9g' />
    </
    object>

    </
    body>
    </
    html
    Please help, thanks

  • #2
    New Coder
    Join Date
    Apr 2007
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Your missing a ' after the style attribute, it should be:

    Code:
    <object type='application/x-shockwave-flash' style='width:425px; height:350px;' data='http://www.youtube.com/v/ejLtDJ5V-9g'>

  • #3
    Regular Coder
    Join Date
    Mar 2007
    Location
    UK
    Posts
    151
    Thanks
    9
    Thanked 2 Times in 2 Posts
    thanks mate, , it worked


  •  

    Posting Permissions

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