Reading lines from a file
<?php $fh = fopen('orders.txt','r') or die($php_errormsg); while (! feof($fh)) { $s = fgets($fh,256); process_order($s); } fclose($fh) or die($php_errormsg); ?>