Re: file_get_contents
| From: | Tom Chubb | Date: | Fri, 17 Nov 2006 13:42:18 +0000 |
| Subject: | Re: file_get_contents | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-244803@lists.php.net to get a copy of this message | ||
The host support team told me that:
Our servers do not allows a HTTP connection onto itself. This is a
security precaution to stop recursive code. You can try to reference
the code by path rather than HTTP
...which works fine!
On 17/11/06, Tom Chubb <tomchubb@gmail.com> wrote:
Very interesting! I have a reseller account and on another site, the DNS entries were messed up by the host. Could be a similar problem. Thanks On 17/11/06, Stut <stuttle@gmail.com> wrote: Tom Chubb wrote:-- Tom Chubb tomchubb@gmail.com 07915 053312Confused! I'm now getting: file_get_contents(http://www.tnhosting.co.uk/scripts/gclub/player.php) [function.file-get-contents]: failed to open stream: Connection refused in /home/sites/tnhosting.co.uk/public_html/scripts/gclub/updateplaylist.php on line 75 How come you can access it and I can't?!? Permissions are 755. Obviously I was getting it when using file_get_contents('player.php') but when using the URL I get connection refused.The domain www.tnhosting.co.uk is probably not resolving to the right IP when used from that box. Can't think of any other reason that would work remotely but not locally. -Stut