RE/pinboard

Extract images from a web page with PHP and the Simple HTML DOM Parser

After posting about how to get the meta tags from an HTML web page with PHP I was asked how to get the images from an HTML page with PHP like how Facebook does when a link is posted. This post looks at how to get the image URLs from a page using the Simple HTLM DOM Parser library and in a later post I'll look at how to download the images and make thumbnails.