In one of my applications I am saving a YouTube video\'s id... Like "A4fR3sDprOE". I have to display its title in the application. I got the following code for getting
// Use @ to suppress warnings
$content = @file_get_contents("http://youtube.com/get_video_info?video_id=" . $video_id);
if($content===FALSE) {
.. Handle error here
}
else{
..The rest of your code
}