Possible Duplicate:
How to parse and process HTML with PHP?
I’ve tried to figure this out for awhile now. I’m trying to not only get the contents of a webpage using file_get_contents($url) but also be able to draw out specific data.
A webpage I was interested in grabbing the contents of, is Craiglist. This is just one example. I’d like to form an array of states with areas and accompanying websites, but I cant seem to find the way to get the specific elements of the page. Any help would be really appreciated!
Use http://simplehtmldom.sourceforge.net/
Example getting all link from
http://www.craigslist.org/about/sitesOutput