Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-02-2007, 09:58 PM   PM User | #1
tyanque
Regular Coder

 
Join Date: Mar 2007
Location: UK
Posts: 151
Thanks: 9
Thanked 2 Times in 2 Posts
tyanque is an unknown quantity at this point
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
tyanque is offline   Reply With Quote
Old 06-02-2007, 10:11 PM   PM User | #2
argothian
New Coder

 
Join Date: Apr 2007
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
argothian is an unknown quantity at this point
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'>
argothian is offline   Reply With Quote
Old 06-02-2007, 10:42 PM   PM User | #3
tyanque
Regular Coder

 
Join Date: Mar 2007
Location: UK
Posts: 151
Thanks: 9
Thanked 2 Times in 2 Posts
tyanque is an unknown quantity at this point
thanks mate, , it worked
tyanque is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:42 AM.


Advertisement
Log in to turn off these ads.