I am using PHP simple DOM parser but it does not seem to have the functionality to search for text. I need to search for a string and find the parent id for it. Essentially
$html = file_get_html('http://www.google.com/'); $eles = $html->find('*'); foreach($eles as $e) { if(strpos($e->innertext, 'theString') !== false) { echo $e->id; } }
http://simplehtmldom.sourceforge.net/manual.htm