Sun, 12/22/2019 - 09:40
#1
file_get_contents and connection refused error
I'm getting the following error:
Warning: file_get_contents(http://open.mapquestapi.com/geocoding/v1/address?key=MYKEY&location=Chicago,IL): failed to open stream: Connection refused in /home/mysite/public_html/mapq.php on line 2
Here's the PHP code:
<?php
$json = file_get_contents('http://open.mapquestapi.com/geocoding/v1/address?key=MYKEY&location=Chic...');
It'll be great if someone can let me know how this can be addressed and thanks for your time ahead.
It'll be great if anyone with a very basic PHP knowledge can comment on this.
What I understant is that this error is implying that MapQuest server is blocking the file_get_contents requests.
Of course, it shouldn't block these requests and this is probably a minor mistake made recently.