homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

What went wrong with this file read PHP code?

 11:15 pm on Dec 2, 2002 (gmt 0)

Could someone help me with this error message I got when running a file read PHP line?

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


$file = fopen ("http://[removed]/info_price.php?masterid=631185", "r");

if ($file) {
$RetrieveFile = fread($file, 128);
if (!ereg("N", $RetrieveFile))
$price_temp = $RetrieveFile;

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?




 3:01 am on Dec 3, 2002 (gmt 0)

maybe your domain is resolved to on server, and u didn't config httpd for this ip, just guessing...


 3:57 am on Dec 3, 2002 (gmt 0)

I was actually trying to retrieve data from another server. not local.


 7:38 pm on Dec 3, 2002 (gmt 0)

I am not totally sure what is the problem but I did find this

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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved