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
It may work to use the error control operators before file_get_contents.
Something like:
if($content = @file_get_contents("http://youtube.com/get_video_info?video_id=" . $video_id))
It should remove the error and use it to return false in your if
statement.
Else you can just use try/catch statement (see Exceptions):
try{
// Code
}
catch (Exception $e){
// Else code
}