Ihave a 1 GIGA byte file, and I want to get emails found on each line. The regular expressions part is easy.
Using $string= implode('',file('bigfile')) is impractical -- it would put a gig in memory before anything else.
I know how to use $fp=fopen('bigfile', 'r'), but all I've ever used to read the file is fgetcsv(), though I suppose I could use that if I wanted and just implode it (hey, an answer to get this done!)
But is there a more elegant way to read lines until the file is completed?
Mucho Thanks,
Sam