Forum Moderators: coopster
Warning: fopen("http://[removed]/info_price.php?masterid=631185", "r") - Success in /home/virtual/site1/fst/var/www/html/hardware/pricegrab.php on line 2
------------------------------------------------
CODE BELOW
------------------------------------------------
$file = fopen ("http://[removed]/info_price.php?masterid=631185", "r");
if ($file) {
$RetrieveFile = fread($file, 128);
if (!ereg("N", $RetrieveFile))
{
$price_temp = $RetrieveFile;
}
fclose($file);
}
print $price_temp;
------------------------------------------------
The $price_temp is supposed to be $163.23, but intead of this, I got the error message. Is there something I did wrong?
Thanks!
If PHP has decided that filename specifies a registered protocol, and that protocol is registered as a network URL, PHP will check to make sure that allow_url_fopen is enabled. If it is switched off, PHP will emit a warning and the fopen call will fail.
on fopen [php.net], there is a link to protocols on that page as well that may point you in the right direction.