Title says it all really, I need a library that allows me to quickly get data out of a HTML page without having to fully implement downloading, redirects, etc. in detail.
Any suggestions?
I would check out Goutte, a simple PHP Web Scraper.
Goutte is a screen scraping and web crawling library for PHP.
Goutte provides a nice API to crawl websites and extract data from the HTML/XML responses.
file_get_contents()
when you pass it the rightcontext
. For parsing, you can use the DOM functionality easily (provided the document is not too crappy). I'm doing that for many things, and it's usually just a few lines of code (depending on the amount of data entities to retrieve).