Someone please tell me how to get the innerText here...
I have this on a page I am scraping with a simple PHP script
<FONT COLOR="#FFFFFF">term extension</FONT>
<FONT COLOR="#FFFFFF">expiration</FONT>
<FONT COLOR="#FFFFFF">name</FONT>
<FONT COLOR="#FFFFFF">term length</FONT>
I've tried like 10 different things, but cant get the innerText or innerHtml...
Yes, I am a n00b when it comes to PHP !
I have this on a page I am scraping with a simple PHP script
<FONT COLOR="#FFFFFF">term extension</FONT>
<FONT COLOR="#FFFFFF">expiration</FONT>
<FONT COLOR="#FFFFFF">name</FONT>
<FONT COLOR="#FFFFFF">term length</FONT>
PHP:
// parse the html into a DOMDocument
$dom = new DOMDocument();
@$dom->loadHTML($html);
// grab all the on the page
$xpath = new DOMXPath($dom);
$vals = $xpath->evaluate("/html/body//font");
for ($i = 0; $i < $vals->length; $i++) {
$val= $vals->item($i);
$output = $val->getAttribute('innerText');
echo "<br />Value: $output ";
}
Yes, I am a n00b when it comes to PHP !