02-27-2008, 05:54 AM
|
#2 (permalink)
|
|
The Contributor
Join Date: Jan 2008
Location: Brazil
Posts: 77
Thanks: 14
|
If you're scraping content from websites (that is: HTML) I guess string processing via strpos() and regular expressions are a thing of the past.
If you're using PHP5 it's very easy to scrape content using the DOM Functions. All you need is a DOMDocument object, then you call the DOMDocument->loadHTML() function and you can navigate the DOM using functions like getElementById, getElementsByTagName.. just like JavaScript. 
|
|
|