I am working on a project where if a user submits a URL, it should grab the title, images, and description from that URL and then give an option to change between images.
When submitted it should post those values.
Facebook, Google+ gets image, title, description from two known ways.
1) Most of the well-know websites gives og tags. It contains title, description, image http://ogp.me/
2) meta tags inside head tag of html will also be published by many sites. You can make use of that also.
For more explanation see the following link.
I advise that you make a PHP page that parses the information and returns the data to you Ajax function. So to summarize, you'll want to google: "PHP Parsing HTML" and "Ajax PHP Retrieve Data".