...

View Full Version : Youtube



tyanque
06-02-2007, 10:58 PM
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
<!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:

<!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

argothian
06-02-2007, 11:11 PM
Your missing a ' after the style attribute, it should be:


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

tyanque
06-02-2007, 11:42 PM
thanks mate, :) , it worked :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum