file_get_contents and connection refused error

5 posts / 0 new
Last post
a-t-ltd
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.


MQBrianCoakley
The MapQuest request works
The MapQuest request works great. I'm not a PHP developer, so I can't tell what's going wrong there.

a-t-ltd
It'll be great if anyone with

It'll be great if anyone with a very basic PHP knowledge can comment on this.


a-t-ltd
What I understant is that

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.


MQBrianCoakley
The API is performing as
The API is performing as expected and no other users have contacted us with similar issues. Everything looks good on our side.