Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mechanize and BeautifulSoup for PHP? [closed]

I was wondering if there was anything similar like Mechanize or BeautifulSoup for PHP?

like image 404
Alix Axel Avatar asked Aug 12 '09 01:08

Alix Axel


2 Answers

SimpleTest provides you with similar functionality:

http://www.simpletest.org/en/browser_documentation.html

like image 129
Jon Avatar answered Oct 02 '22 23:10

Jon


I don't know how powerful BeautifulSoup is, so maybe this won't be as great ; but you could try using DOMDocument::loadHTML :

The function parses the HTML contained in the string source . Unlike loading XML, HTML does not have to be well-formed to load.

After using this, you should be able to access the HTML document using DOM methods -- including XPath queries.

like image 38
Pascal MARTIN Avatar answered Oct 02 '22 22:10

Pascal MARTIN