Jump to content

script for fetching content

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
Sajid213

Sajid213

    Newbie

  • Members
  • Pip
  • 2 posts
i am trying to make a script that can automatically fetch latest X videos from youtube. i want to get the thumbnail and the embed code of the video and add it to a database table. i am trying to use preg_match_all to do this. i am new to regular expressions so i am having trouble getting it to work.
can anyone give me the code for this script?

#2
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Instead of fetching the website contents and trying to parse the data on Youtube, you should work with their API: YouTube APIs and Tools - Google Code

This will allow you to fetch the data you desire from an XML document with relative easy.

#3
Sajid213

Sajid213

    Newbie

  • Members
  • Pip
  • 2 posts
thanks. i didn't know about that API :D