Embedding Youtube Videos In PHP

Status
Not open for further replies.
2 comments
Here you go:

PHP:
<?php if (isset($_GET['v'])) $videoid = $_GET['v']; ?>
<object width="425" height="344">
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="http://www.youtube.com/v/<?php echo $videoid; ?>" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>
</object>

Create a new file as yt.php with the data given above and upload it in your website.
Example would be:


Or

 
Status
Not open for further replies.
Back
Top