php proxy - broken

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
danharibo
Forum Commoner
Posts: 76
Joined: Thu Aug 17, 2006 8:56 am

php proxy - broken

Post by danharibo »

Yeah, It keeps thrwoing up this error:
Warning: fread(): supplied argument is not a valid stream resource in /home/www/suf.awardspace.co.uk/Blog/index.php on line 124
From this:

Code: Select all

//first run,print form,if your site is public
            if($is_public==true){
                $self_url = "http://".$HTTP_SERVER_VARS['HTTP_HOST'];
		echo $self_url;
		$lang_url = $self_url."/Blog/lang/English.php";
		echo $lang_url;
                $fp = @fopen($lang_url,"r");
                while($data = fread($fp, 4096)) $content.=$data; -- 124
                echo $content;

                //die();
Line iwth -124 is line 124
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Get rid of the error suppression and see if there is more information getting thrown at you. It might be permissions, but like I said, get rif of the hushed errors and post back.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I'll guess it's an allow_url_fopen issue.
Post Reply