I want to extract the Title of YouTube's videos. How can I do this?
Thanks.
What are YouTube titles? Titles are the names of your YouTube videos and they are mandatory in order to post anything on YouTube. This means that you can't post a YouTube video without a title. They vary in length and are extremely important.
Easiest way to obtain information about a youtube video afaik is to parse the string retrieved from: http://youtube.com/get_video_info?video_id=XXXXXXXX
Using something like PHP's parse_str(), you can obtain a nice array of nearly anything about the video:
$content = file_get_contents("http://youtube.com/get_video_info?video_id=".$id); parse_str($content, $ytarr); echo $ytarr['title'];
That will print the title for the video using $id as the video's id.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With