Bug #11533: Error during fopen of remote-file-result
| From: | j dot parree at net-communications dot de | Date: | Mon, 18 Jun 2001 10:22:08 +0000 |
| Subject: | Bug #11533: Error during fopen of remote-file-result | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-56808@lists.php.net to get a copy of this message | ||
From: j.parree@net-communications.de
Operating system: WINNT 4.0 - Service Pack 6a, IIS4, option pack installed
PHP version: 4.0.4pl1
PHP Bug Type: Filesystem function related
Bug description: Error during fopen of remote-file-result
Script:
$query = str_replace("+", " ", $query);
$query = str_replace("#", " ", $query);
$query = str_replace("&", " ", $query);
$query = str_replace(";", " ", $query);
$query = str_replace(" ", "+", $query);
$file1 = fopen("http://www.google.com/search?q=$query",
"r");
$rf1 = fread($file1, 40000);
fclose($file1);
$grab1 = ereg("<p>(.*)<div class=nav>", $rf1, $printing1);
$printing1[1] = str_replace("<A HREF=/", "<A HREF=http://www.google.com/", $printing1[1]);
$printing1[1] = str_replace("<a href=/", "<A HREF=http://www.google.com/", $printing1[1]);
if ($printing1[1] == "") {
echo " <b><font size=\"2\"
color=\"#FF0000\">Keine Resultate</font></b>";
} else {
echo $printing1[1];
}
-----------------------------------------------------------
The System:
- php 4.0.4pl1 (bin 32, WINNT4.0, optionpack installed)
- mysql (not important for this issue)
- IIS4
(- IBM Netfinity 3500 M10)
-----------------------------------------------------------
This script works fine on Linux, but not on this NT mashine.
--
Edit Bug report at: http://bugs.php.net/?id=11533&edit=1