note 81524 deleted from function.fgets by nlopess
| From: | nlopess@php.net | Date: | Sun, 02 Mar 2008 22:17:58 +0000 |
| Subject: | note 81524 deleted from function.fgets by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-136673@lists.php.net to get a copy of this message | ||
Note Submitter: hamiltont at gmail dot com
----
if you need to parse a huge log (to big to load all at once) and wanna use fgets, but the log is on
different lines, like this,
Client Stats (01/07/08 15:51:08)
Avg Bitrate:44137
Bandwidth Output:55916
Bandwidth Usage:54792
Client Count:52
RTSP Client Count:7
HTTP Client Count:12
Cloaked Client Count:0
just do
$data = fgets($h_read) . fgets($h_read) . . . fgets($h_read);
Its ugly, but its still better than loading a huge file into memory and using preg_match_all or
something.