Possible Duplicate:
Best methods to parse 开发者_JS百科HTML How to get href from anchor tag with particular class
hi guys,
I need an html parser. Baiscally given an html in a string i need to extract every href of
Which html parser for php do u suggest me? Someone that handles wrong html too.
Thanks
I would recommend using DOMDocument, it's often (always?) compiled with PHP 5.
You can use DOMXpath for extracting all href
attributes.
This is the best tool I have tested to parse HTML and extract data.
精彩评论