Get youtube video title in PHP
In one of my application I am saving youtube video's id... Like "A4fR3sDprOE" .. I have to display its title in application. I got the following code for getting its title and also its working fine. Now the problem is if any error occured ( in case of delete the video ) php showing a error. I hust added a condition. But still its showing error. foreach($videos as $video) { $video_id = $video->videos; if($content=file_get_contents("http://youtube.com/get_video_info?video_id=".$video_id)) { parse_str($content, $ytarr); $myvideos[$i]['video_title']=$ytarr['title']; } else $myvideos[$i]['video