I am having a problem with parsing an API which was working fine till yesterday!
The code snippet :
$checkurl = "http://api1.webpurify.com/services/rest/?method=webpurify.live.check&api_key=&text=".urlencode('test test test');
$response = simplexml_load_file($checkurl,'SimpleXMLElement', LIBXML_NOCDATA);
The problem is simplexml_load_file()
is not returning any value and loads forever!
This is not a SimpleXML problem, but most likely occurs because the download is being blocked somehow.
Open up your browser and try to access the URL first; if you can download the file properly, save it and run it through SimpleXML again. That would eliminate at least one factor.