Archive

Posts Tagged ‘youtube id’

Check if youtube video is still valid – YouTube API

August 6th, 2009 1 comment
Check if youtube video is still valid – YouTube API fast PHP function to check if youtube video is still valid: <?php function checkYoutubeId($id) { if (!$data = @file_get_contents("http://gdata.youtube.com/feeds/api/videos/".$id)) return false; if ($data == "Video not found") return false; return true; } function checkYoutube($vid) { if (strlen($vid) < 12) { return checkYoutubeId($vid); } $preg1 = '@www.youtube.com\/watch\?v=(.*?)$@'; if ( preg_match($preg1, $vid, ...
GoCache - ByREV-Cache v1.0 - live served in : 0.573325 sec (gzip)