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?
Software Recommendations Stack Exchange is a question and answer site for people seeking specific software recommendations. It only takes a minute to sign up.
Sign up to join this communityI 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).