hello ,
i wanna make a small video sharing script , i need to show the videos in my script from youtube and google with the all data (thumbnail, the title and description),
so i wrote a code to put the video link in the $url then i limit the video type if its youtube or google to show the video in the script and i succeed on that but i cant output the video thumbnail, the title and description and i dont know how
so here is my code and please help me to output the data
<?php
$site_type = "1"; / site_type=1 --> youtube ...... site_type=2 --> google/
/ limit the site_type, then put the video link in the $url and here are examples for youtube & google videos
http://www.youtube.com/watch?v=9IOpuGVoyCk
http://video.google.com/videoplay?docid=-4779350646730989642&ei=jH3QSIjwHJKsiALZ9qHDAg&q=race&vt=lf /
$url = "";
$parts = explode("=", $url);
$video_id = $parts[1];
if ($site_type == '1') {
?>
<object type="application/x-shockwave-flash" width="444" height="333"
data="http://www.youtube.com/v/<?php echo $video_id; ?>"><param name="movie"/></object>
<?php
}
elseif ($site_type == '2') {
?>
<object type="application/x-shockwave-flash" width="444" height="333"
data="http://video.google.com/googleplayer.swf?docId=<?php echo $video_id; ?
&hl=en&stop=true&playerMode=simple"><param name="movie"/></object>
<?php
}
?>
thanks