Jump to content

Parsing URL contents


Tpjohns
 Share

Recommended Posts

I want to scrape the contents of a table at a specific URL. I do a get file contents on the URL. The table has 9 columns of which I only want to display 5. I am assuming I need PHP, but am not exactly comfortable with the parsing piece.Does anyone have an example of identifying the HTML elements to echo?

Link to comment
Share on other sites

D0M can parse remote file. If remote file access is disabled by your host you can use curl to fetch the page and use its content in DOM. Don is easier when you are handling html and xmlBe aware that different host has different scraping policy. Scraper should obey the robot.txt file (proper way of using). If their is an api for 3rd party site better use it. For resource abuse 3rd party site could block your ip

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...