Hi,
As you do not know how large the file is (Which means it can be potentially very large) I would use [man]fgets[/man], which will read a line at a time, using while (!FEOF($handle)) to read each line, as suggested in the manual:
$handle = @fopen("/tmp/inputfile.txt", "r");
if ($handle) {
while (!feof($handle)) {
$buffer = fgets($handle, 4096);
echo $buffer;
}
fclose($handle);
}
Then use a regular expression I suppose to get all elements out. regexps are not my forte, but I am sure there is someone who can whip up one to read the format quite easily, as all you want to do is match:
(A-Z0-9). SPACES (0-9). SPACES (0-9). SPACES (0-9). SPACES (0-9). SPACES (A_Z). SPACES (A-Z). and retrieve the non-space segments