<?php
$video_id = ’48J_DIZBNyE’;
$content = file_get_contents(“http://youtube.com/get_video_info?video_id=” . $video_id);
parse_str($content, $ytarr);
echo $ytarr[‘title’] . ‘<hr>’ ; // title
?>
update:
you can also use this way
<?php
$video_id = ’48J_DIZBNyE’;
$video_info = simplexml_load_file(‘http://gdata.youtube.com/feeds/api/videos/’.$video_id.’?v=1′);
echo $video_info->title . ‘<hr>’; // title
echo $video_info->content; // description
?>
This was very helpful Thank You for this great post
Thank you! Very simple
Thank you very much,
J’ai un problème avec les titre en arabe, y a t il un moyen de les convertir avec l’insctruction iconv
Thank you for this tip.
Very useful to me..Thanks
Thanks so much! Just what I needed. Very simple.
Unfortunately you can not get the description, right?
How can we get video file from youtube?
Rodrigo: I’ve updated with alternate way 🙂
Quality posts is the main to attract the people to go to see the web
site, that’s what this web page is providing.
Thanks! First option worked for me. Second throws warnings and couldn’t retrieve the data from the given url.