views:

105

answers:

1

Hello,

I'm looking for some direction on a script that I'd like to build.

Essentially, I am looking to build something that functions similar to that of Facebook, where users can provide a URL, and in turn, the script grabs the 'page information' from that URL.

Furthermore, if a user were to provide a YouTube URL, it would be able to parse the link and embed the video and title.

I'm not looking for anyone to write the code, just some direction on how to start building this (I'm using PHP/jQuery), or if there are any plugins that already achieve this sort of thing.

Many thanks!

+1  A: 

You can use phpQuery, and get the power of PHP with the Selectors of jQuery. Load the remote content with file_get_contents($url), and then use the powerful jQuery-style selectors in phpQuery to extract the video-markup.

Jonathan Sampson