It would be a good idea to lock the file. This is essential for writing but advisable for reading. Use code like this:
<?php
$fp = fopen('file.txt', 'r');
if($fp) {
if(flock($fp, LOCK_SH)) {
$read = fread($fp, 1024);
flock($fp, LOCK_UN);
}
fclose($fp);
}
?>
Check out the manual here:
http://www.php.net/manual/en/function.flock.php