NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Embed Videos ( Such as: Youtube, Googlevideo...) On PHP Site ?

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 08-22-2007, 08:43 PM THREAD STARTER               #1 (permalink)
NamePros Member
Join Date: Dec 2006
Posts: 126
good_looking is an unknown quantity at this point
 



Embed Videos ( Such as: Youtube, Googlevideo...) On PHP Site ?


Hi Everyone,
Im new to php scripting. Im trying to create a website that can embed movies in php site from youtube or googlevideo, but it seem doesn't work. Can anyone here show me how to write the code to embed videos into my site. Thanks in advance.
good_looking is offline  
Old 08-23-2007, 02:01 AM   #2 (permalink)
Danltn.com
 
Daniel's Avatar
Join Date: May 2007
Location: Danltn.com / Nottingham, UK
Posts: 1,201
Daniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond repute
 


Ethan Allen Fund Ethan Allen Fund
Code:
<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/iFMiT4hJ17I"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/iFMiT4hJ17I" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>
For YT videos, change iFMiT4hJ17I to your own video ID. Instructions are on the site though...
Daniel is offline  
Old 08-23-2007, 02:54 PM THREAD STARTER               #3 (permalink)
NamePros Member
Join Date: Dec 2006
Posts: 126
good_looking is an unknown quantity at this point
 



Thanks for quick reply. I have tried this code before but it doesn't work. Here is the user input page code:
Code:
<tr> 
      <td align=right><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
        Post a Video:</font></td>
      <td><input type="text" name="title2" size="30" style="width:98%"></td>
    <tr> 
      <td align=right valign=top>URL:</td>
      <td><input type="text" name="url2" size="40" style="width:98%" value="" /></td>
    </tr>
Here is my php view page:
Code:
//get the item details
$t1 = "select * from dd_items where ItemID = '$_GET[ID]' ";
$s1 = mysql_query($t1) or die(mysql_error());
$m1 = mysql_fetch_array($s1);

//URL is the name of my database column for the link which user have inputed in previous page
$videourl = $m1['URL'];
Here is my html page:
Code:
<tr>
	<td align="center"><object width="425" height="350"><param name="movie" value="<?=$videourl?>"></param><param name="wmode" value="transparent"></param><embed src="<?=$videourl?>" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object></td>
</tr>
When I view the html page, i see nothing (blank page); but when I view the source of html page i see the link which users input has been replace with php code "<?=videourl?>". Do you know what happens ?
good_looking is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 11:15 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger