note 81524 added to function.fgets

From: Date: Sun, 02 Mar 2008 20:22:28 +0000
Subject: note 81524 added to function.fgets
Groups: php.notes 
Request: Send a blank email to php-notes+get-136670@lists.php.net to get a copy of this message
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. ---- Server IP: 64.71.164.2 Probable Submitter: 129.59.82.21 ---- Manual Page -- http://www.php.net/manual/en/function.fgets.php Edit -- https://master.php.net/note/edit/81524 Del: integrated -- https://master.php.net/note/delete/81524/integrated Del: useless -- https://master.php.net/note/delete/81524/useless Del: bad code -- https://master.php.net/note/delete/81524/bad+code Del: spam -- https://master.php.net/note/delete/81524/spam Del: non-english -- https://master.php.net/note/delete/81524/non-english Del: in docs -- https://master.php.net/note/delete/81524/in+docs Del: other reasons-- https://master.php.net/note/delete/81524 Reject -- https://master.php.net/note/reject/81524 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#136670) next »