the fopen() function alongwith the fgets() can easily
get a line from any file containg our query and print
it out using this code :

<?
$fd = fopen ("try.txt", "r") or Die ("Could not
open");
while (!feof ($fd)) {
$buffer = fgets($fd, 10000);
if (ereg ("whatIwant", $buffer)) {
echo $buffer;
}}fclose ($fd);
?>

however, if i open a url file which is actually being
redirected to a new file...how to read that file?
if $fd = fopen("http://www.to.com/nothin","r");
and this url actually redirects to a new file... i
need to read the contents of this new file. There is
no address for this new file as it is generated using
the parameters sent to the "nothing" cgi file.
Also, what if this new file has a frameset... i need
to read contents of only one of the frame file. I know
the "frame name" of the frameset in which i got the
file... but how to make fopen() actually reach that
frameset file.? is it possible??

Regards,
T. Edison jr.

--- Felix Kronlage <[EMAIL PROTECTED]> wrote:
> On Mon, Apr 02, 2001 at 04:38:16AM -0700, Thomas
> Edison Jr. wrote:
> 
> > For example i want the file pointer to search & if
> > found, print the word "enter" from the open file.
> how
> > to do this?
> 
> work your way trough the file with fgets() and
> compare
> each line to a regular-expression (ereg*() or
> preg_*())
> 
> -fkr
> -- 
> gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0  8A48 0D31
> 9BD3 D9AC 74D0 
>   |http://www.hazardous.org/ | whois -h
> whois.ripe.de FKR-RIPE  |
>   |all your base are belong to us  |  shame on me  |
> fkr@IRCnet | 
> 


=====
Rahul S. Johari (Director)
******************************************
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
*******************************************

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to