Re: Fopen

From: Date: Fri, 26 Jan 2001 10:58:25 +0000
Subject: Re: Fopen
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-36770@lists.php.net to get a copy of this message
> <? > $fp = > fopen("http://www.parentprofiles.com/clicker.php?profile_id=" > . $this->profile_id > . "&code=1","r"); > echo $fp; > ?> > > to do it. however when I do all I get is a response that says: > Resource id #1 > instead of giving me the page. Any ideas? Basically, that Resource id # 1 is like a paper receipt at the lumber yard. You need to take the piece of paper 'round back and pick up your lumber. We do it that way cuz you might be picking up a lot of lumber :-) Or, in the case of web sites, you might only need the first few lines of the HTML, so there's no point in shoving the whole thing through if you're not going to read it all. while (!feof($fp)){ $html = fread($fp, 1024); #Reads 1K max at a time. echo htmlEntities($html); } You can increase the 1024 to whatever number you find works best to get the page the fastest. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm

« previous php.general (#36770) next »