Originally Posted by
hostonnet
I got this codes while searching for clean youtube embed on vshare sites. but this code is not for vshare do you think you can modify and make it work for vshare bulk embed? it would be very nice, it will embed without ads, banners, logo etc from youtube.
the code is:
PHP Code:
<?php
function str_between($string, $start, $end){
$string = " ".$string; $ini = strpos($string,$start);
if ($ini == 0) return ""; $ini += strlen($start); $len = strpos
($string,$end,$ini) - $ini;
return substr($string,$ini,$len);
}
function get_youtube_download_link(){
$youtube_link = "http://www.youtube.com/watch?v=".$_GET['v'];
$youtube_page = file_get_contents($youtube_link);
$v_id = str_between($youtube_page, "&video_id=", "&");
$t_id = str_between($youtube_page, "&t=", "&");
$flv_link = "http://www.youtube.com/get_video?video_id=$v_id&t=$t_id";
die('<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title></title>
<link></link>
<item>
<title></title>
<media:content url="'.$flv_link.'&.flv"
type="video/x-flv" />
<media:thumbnail url="http://i.ytimg.com/vi/'.$_GET
['v'].'/2.jpg" />
</item>
</channel>
</rss>
');
}
get_youtube_download_link();
?>
Please suggest if we can work with this?
source of this codes are at :http://www.110mb.com/forum/embed-you...-t41201.0.html
Bookmarks