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
My solution is:
$xmlInfoVideo = simplexml_load_file("http://gdata.youtube.com/feeds/api/videos/" . $videoId . "?v=2&fields=title"); foreach($xmlInfoVideo->children() as $title) { $videoTitle = strtoupper((string) $title); }
This get the title of the video.