I am trying to access a second server with file_get_content and simple_load_xml and I get
failed to open stream: Connection refused
What can be the result?
allow_url_fopen=Yes
allow_url_include=Off
is my php.ini values
I am trying to access a second server with file_get_content and simple_load_xml and I get
failed to open stream: Connection refused
What can be the result?
allow_url_fopen=Yes
allow_url_include=Off
is my php.ini values
I believe this is because you need a resource - fopen(), instead of a string - file_get_contents()
Your connection to the resource is being rejected. Ensure that you can access the resource from the server (Using Lynx for instance).
Sounds like the 2nd server is rejecting the file, try using curl to obtain the file instead; the benefit of using curl is that it'll give you helpful debugging information in the event of a failure like this. get_file_content() masks a lot of this helpful information.