| 1:52 pm on Feb 5, 2011 (gmt 0)|
Perhaps it would be easier if someone could just give me a simple way of displaying the xml result from the url below using php.
I thought the tutorial I had stumbled on would be a simple way to do that, but I can't understand why these errors are coming up with the simple_xml_file function... Seems like this should be a relatively simple task...
| 3:26 pm on Feb 5, 2011 (gmt 0)|
Is it possible your hosting provider has placed restrictions on making external connections?
A simple way to test would be:
| 4:52 pm on Feb 5, 2011 (gmt 0)|
Seems that way. Your code produced this error:
"file_get_contents(http://google.com/) [function.file-get-contents]: failed to open stream: Connection refused in"...
I don't suppose there is anything that I can do about this? Is there anything in php.ini that can be changed to allow external connections?
| 7:27 pm on Feb 5, 2011 (gmt 0)|
There is a option in php.ini [php.net] to disable requests using external urls, but it doesn't give the same error as you're getting when enabled so it probably isn't that.
"Connection refused" suggests server settings or a firewall stopping your script from connecting out, you probably have to upgrade your package to be able to do that. :(
| 7:35 pm on Feb 5, 2011 (gmt 0)|
I contacted my host provider and they confirmed that you were correct, that they had placed restrictions on making external connections. They were nice enough to enable them for my account and everything is working now! Thanks for your expertise!
| 7:58 pm on Feb 5, 2011 (gmt 0)|
Happy to help!