Recently, with no changes to my code, my PHP page started to hang at a certain area. It generates all of the HTML on the page right before this line:
$tickerJSON = file_get_contents("http://mtgox.com/code/data/ticker.php");
I commented out everything else and this is the cause of the error.
I know that that JSON url is valid and the array names are correct. I’m not sure where the problem is in this case. Any help?
Note: It doesn’t display a partial or white page, it’ll keep loading forever with no display output.
Update:
The remote connection you do takes a very long time. You can go around with that providing a timeout value. If it takes too long, the function won’t return any data but it wont hinder the script as well from continuing to run.
Next to that you need to set the user-agent: