fopen Problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tnewman
Forum Newbie
Posts: 2
Joined: Wed Nov 14, 2007 12:56 pm

fopen Problem

Post by tnewman »

<?php
$queryString= $_GET["CategoryID"];
$requestingPage="http://www.ProfessionalLinkBuilding.com ... ueryString;
$file = fopen ($requestingPage, "r");
while (!feof ($file)) echo fgets ($file, 1024);
fclose($file);
?>

is giving me this error:

This is the error

Warning: fopen(http://www.professionallinkbuilding.com ... ategoryID=) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/mayfair/public_html/TopList.php on line 4

Warning: feof(): supplied argument is not a valid stream resource in /home/mayfair/public_html/TopList.php on line 5

Warning: fgets(): supplied argument is not a valid stream resource in /home/mayfair/public_html/TopList.php on line 5

Can someone please help me out? The Php variable allow_url_fopen is on in the server.

Thank you!
Post Reply