xpath - XML Import script error - simplexml_load_string -


i have xml import script uses "simplexml_load_string" import feed of real estate properties. script scheduled run 1am each night.

it has worked fine many months; yesterday started error below:

php warning:  simplexml_load_string() [<a href='function.simplexml-load-string'>function.simplexml-load-string</a>]: entity: line 2: parser error : content @ end of document in /public_html/import/import-script.php on line 26  php warning:  simplexml_load_string() [<a href='function.simplexml-load-string'>function.simplexml-load-string</a>]: &lt;body&gt;&lt;h1&gt;object moved&lt;/h1&gt;this object may found &lt;a href=&quot;http://admin.homees in /public_html/import/import-script.php on line 26  php warning:  simplexml_load_string() [<a href='function.simplexml-load-string'>function.simplexml-load-string</a>]: ^ in /public_html/import/import-script.php on line 26  php fatal error:  call member function xpath() on non-object in /public_html/import/import-script.php on line 28 status: 500 internal server error x-powered-by: php/5.2.17 content-type: text/html 

i cannot understand why error shows; feed still opens in browser ok. plus w3c validate ok too.

please can explain error means / why might seeing it?

also check server log , says: [error] [client 46.208.46.63:41713] ah01215: php fatal error: call member function xpath() on non-object in /public_html/import/import-script.php on line 30

this snippet of our php import script:

$ch2 = curl_init(); $timeout = 60;  curl_setopt ($ch2, curlopt_url, "external-website/provided-feed.xml"); curl_setopt ($ch2, curlopt_returntransfer, 1); curl_setopt ($ch2, curlopt_connecttimeout, $timeout); $xmlstring = curl_exec($ch2); curl_close($ch2);   $xml = simplexml_load_string($xmlstring); $propertys = $xml->xpath("//property"); $count=0; 

huge in advance! craig.


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -