0

I am about to finish my script that parses/scrapes website using mechanize&ruby.

I need to port my script to PHP in the future.

My question is

  • if there is any library available for both ruby and php or
  • if anybody can recommend any other approach to this?
0

4 Answers 4

1

There's no PHP equivalent of Ruby and Mechanize.

However, Zend_Framework offers some great scraping-related libraries including

  • Zend_URI and Zend_HTTP_Client
  • Zend_Dom
Sign up to request clarification or add additional context in comments.

Comments

1

As standard, PHP comes with several tools for parsing XML (and the DOM one can cope with a lot of badly formed HTML)

See

https://www.php.net/manual/en/refs.xml.php

C.

Comments

1

For DOM manipulation in PHP use the DOMDocument class

Simple and easy :)

Comments

1

Another DOM manipulation tool for php is phpQuery.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.