How to read the last line of http:// file 
Author Message
 How to read the last line of http:// file

How to do that? Is this possible with PHP? Can't use fseek (http file)...


Sat, 04 Jun 2005 23:32:33 GMT  
 How to read the last line of http:// file

Quote:

> How to do that? Is this possible with PHP? Can't use fseek (http file)...

One way is to read it into an array and array_pop() the last line off.
Another way is to read until eof, storing each previous line, then
print/process only the last line.

However, in most html pages the last line is likely to look just like:
</html>

--
----- stephan beal
Registered Linux User #71917 http://counter.li.org
I speak for myself, not my employer. Contents may
be hot. Slippery when wet. Reading disclaimers makes
you go blind. Writing them is worse. You have been Warned.



Sat, 04 Jun 2005 23:59:19 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. read the last line in file

2. How to read the x last lines of a text file

3. File: How to read the last line?

4. how to read text files line by line?

5. reading file line by line

6. new question in how can i read data from file line by line

7. line-by-line file read

8. Read a text file line by line

9. join last 2 lines of a file

10. deleting newline from last line in file

11. print last line of input file

12. how to specify last line of file ?

 

 
Powered by phpBB® Forum Software