Hi,
I use this code to open remote URLs:
$fp = fopen("http://any-url.net", "r");
$content = "";
while(!feof($fp)) $content .= fread($fp, 8192);
fclose($fp);
This works fine.
But for some reason I get the following error message with certain URLs:
Warning: fopen(http://problematic-url.net): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in ... on line ...
This happens even though the URL definitely does exist, which can be verified with any web browser.
Certain URLs always work, certain URLs always fail.
Just for example, all URLs under www.meinewebseite.net/... (e.g. www.meinewebseite.net/mueller) fail, while www.meinewebseite.net/ itself works.
I wasn't able to find anything that all problematic URLs have in common, so I'm stuck with the problem.
I am using PHP 4.2.2 as an Apache 1.3.26 module under Linux.
Thanks to anyone who can help me!
Philipp