If the lines are not very long, can you just use a regular expression to read files? From the php directory, the file_get_contents file has an offset parameter, although this is most likely not to be useful, since you need to know the length of the line in advance. Maybe file_get_contents is not a suitable function to use in this case?
source
share