>>48
<form method="post"><input type="text" name="s"><input type="submit"></form>
<?php $n='./iregui.txt';$x=64;if(isset($_POST['s'])and preg_match(
"/^([0][0-9A-Za-z]{4,$x})$/",$_POST['s'],$m)and $p=fopen($n,'r+')){$d=array();
eval('flock($p,2);');while($l=fgets($p,2+$x))$d[$l]=1;!array_key_exists(
"$m[1]\n",$d)and fwrite($p,"$m[1]\n")and print'これで満足か?';fclose($p);}?>

PHPは詳しく知らん。