Unstoppable Domains โ€” AI Assistant

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

Spaceship Spaceship
Watch

good_looking

Established Member
Impact
0
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.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
.US domains.US domains
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...
 
0
•••
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 ?
 
0
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
Domain Recover
DomainEasy โ€” Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back