Re: file_get_contents gets 404 error
| From: | Frank Arensmeier | Date: | Thu, 11 Jan 2007 21:11:27 +0000 |
| Subject: | Re: file_get_contents gets 404 error | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-246948@lists.php.net to get a copy of this message | ||
In the manual it says:
"You can use a URL as a filename with this function if the fopen wrappers have been enabled...".
First of all, I would check your php.ini file. If everything is ok (fopen wrappers are on), maybe you could post some code. The last option would be to use an other way round by using e.g. curl or anything else. If anybody else is able to open the URL you provided, it must be either you code or your server / PHP config that is messing things up.
//frank
11 jan 2007 kl. 17.01 skrev Németh Zoltán:
2007. 01. 11, csütörtök keltezéssel 16.55-kor Jochem Maas ezt írta:Németh Zoltán wrote:I tried this also, and get the same error still...Hi all, I have some php websites, for example http://www.alterationx.hu/ Now I'm trying to get the site with file_get_contents, and I'm getting this error: Warning: file_get_contents(http://www.alterationx.hu/): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Foundtry this?: file_get_contents("http://www.alterationx.hu/index.php"); (it works for me. that said it works for me without the 'index.php' at the end also.)also check you logs on the site in question to figure out what exactly is going on (i.e. what is being requested, if anything).Yes, I'll contact our system administrator to check the apache logs Thanks Zoltán Németh--PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpcan anyone tell me why? The site otherwise is working, and also getting other sites (not php) on the same server with file_get_contents is working. Thanks in advance Zoltán Németh