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.