Re: [PHP] fopen problem, 5 line script

2004-09-16 Thread Chris Dowell
: Wednesday, September 15, 2004 10:17 AM To: php php Subject: Re: [PHP] fopen problem, 5 line script * Thus wrote Mag: Hi, Can someone tell me what I am doing wrong here please? ?php $fileptr = fopen(http://www.google.com/index.html,r;); $contents = fread($fileptr, filesize($fileptr

Re: [PHP] fopen problem, 5 line script

2004-09-15 Thread Mark
--- Mag [EMAIL PROTECTED] wrote: Hi, Can someone tell me what I am doing wrong here please? ?php $fileptr = fopen(http://www.google.com/index.html,r;); $contents = fread($fileptr, filesize($fileptr)); http://us2.php.net/filesize int filesize ( string filename)

Re: [PHP] fopen problem, 5 line script

2004-09-15 Thread Curt Zirzow
* Thus wrote Mag: Hi, Can someone tell me what I am doing wrong here please? ?php $fileptr = fopen(http://www.google.com/index.html,r;); $contents = fread($fileptr, filesize($fileptr)); ... This is the error I get: Warning: filesize(): Stat failed for Resource id #1 (errno=2 - No

RE: [PHP] fopen problem, 5 line script

2004-09-15 Thread Vail, Warren
I thought filesize required the file name, and not the fileptr??? Warren Vail -Original Message- From: Curt Zirzow [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 10:17 AM To: php php Subject: Re: [PHP] fopen problem, 5 line script * Thus wrote Mag: Hi, Can someone

Re: [PHP] fopen problem, 5 line script

2004-09-15 Thread Mag
--- Curt Zirzow [EMAIL PROTECTED] wrote: * Thus wrote Mag: Hi, Can someone tell me what I am doing wrong here please? ?php $fileptr = fopen(http://www.google.com/index.html,r;); $contents = fread($fileptr, filesize($fileptr)); ... This is the error I get: Warning:

Re: [PHP] fopen problem, 5 line script [SOLVED!]

2004-09-15 Thread Mag
Got it, 'case anybody else needs this: $page = file_get_contents('http://www.google.se/index.html'); if(strstr($page, 'href=/imghp?hl=svtab=wiie=UTF-8')) { $resultt = 1; } else {