0

I'm writing a url parsing program which gets the url (may be anything ranging from a blog post to a wikipedia link) and gets the image from the html and some excerpt content.

I am using Simple HTML DOM Parser and I managed to get the image and content for only some blog post urls. But I am not sure how to make it work for atmost all types of urls.

Just out of curiosity I wanted to know what's the mechanism behind the facebook share thing where you type a url and it shows the relevant images and a little bit of content. I came across on Depth First Search Approach on the search for this problem.

I just need an approach on how I can make it work.

Any help would be appreciated. Thanks

P.S : I get the relevant images and contents from a blog post url because I parse the html using static class names.

vickythegme
  • 367
  • 2
  • 13
  • Here is an answer http://stackoverflow.com/questions/23165820/get-meta-description-title-and-image-from-url-like-facebook-link-sharing – Oleg Oct 18 '14 at 14:06
  • @Oleg I've already referred to those answers! I don't mean to get the meta information instead when I get the whole html content, I need to know how can I get the exact relevant image to the post or the content. What I'm asking is for something like http://embed.ly – vickythegme Oct 18 '14 at 15:33

0 Answers0