Error-prone file locking
<? $locked = 0; while (! $locked) { if (! file_exists('guestbook.txt.lock')) { touch('guestbook.txt.lock'); $locked = 1; } else { sleep(1); } } ?>