Error In Getting Text From Another Website Using Span Id
Posted: Mon Dec 29, 2014 9:36 am
Hi.
I tried to get Text from another Website using Span I. I use this code
But it shows error. Can you correct the code, please ?
Thanks to all.
I tried to get Text from another Website using Span I. I use this code
Code: Select all
$dochtml = new DOMDocument();
$dochtml->loadHTML(http://www.adcd.com/abc); // Note the website url end does not end with ".html,.php,.htm,etc."
$elm = $dochtml->getElementById('spanid1').innerHTML; // I tried to the get the Text of the Span Id "spanid1"
Thanks to all.