I have a script which, each time is called, gets the first line of a file. Each line is known to be exactly of the same length (32 alphanumeric chars) and terminates with \"
You could use file() method.
Gets the first line
$content = file('myfile.txt'); echo $content[0];