How can i scan a html page, for text within a certain div?
+1
A:
The simplest way to do this would be to use Simple HTML DOM parser
// Create a DOM object from a URL
$html = file_get_html('http://www.google.com/');
// Find all <div> which attribute id=foo
$ret = $html->find('div[id=foo]');
codaddict
2009-12-28 20:28:48
A:
You could use build in functionality as suggested by others or you could try the Simple HTML DOM Parser is implemented as a simple PHP class and a few helper functions. It supports CSS selector style screen scraping (such as in jQuery), can handle invalid HTML, and even provides a familiar interface to manipulate a DOM.
It's worth to check it out at http://simplehtmldom.sourceforge.net/
andreas
2010-01-03 09:05:55
person above you already said that?
tarnfeld
2010-01-03 21:30:03