Re: [PHP] fopen problem, 5 line script

2004-09-16 Thread Chris Dowell
o:[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 tell me what I am doing wrong here please? http://www.google.com/index.html","r";); $contents = fread($fileptr, filesize

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=sv&tab=wi&ie=UTF-8"')) { $resultt = 1; } else {

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? > > > > > $fileptr = > > fopen("http://www.google.com/index.html","r";); > > > > $contents = fread($fileptr, filesize($fileptr)); > >... > > > > This is the erro

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 s

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? > > $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

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? > > $fileptr = > fopen("http://www.google.com/index.html","r";); > > $contents = fread($fileptr, filesize($fileptr)); http://us2.php.net/filesize int filesize ( string filename) > > if(strstr(

[PHP] fopen problem, 5 line script

2004-09-15 Thread Mag
Hi, Can someone tell me what I am doing wrong here please? http://www.google.com/index.html","r";); $contents = fread($fileptr, filesize($fileptr)); if(strstr($contents, "href=\"/froogle?hl=en&tab=wf\"")) { $result = 1;}else{ $result = 2;} echo $result; ?> This is the error I get: Warning: fil