HTML TAGS MD5 Hash
Submit word

HTML TAGS
"; $file = fopen($dfile,"r") or exit("unable to open file"); while(!feof($file)){ $password = fgets($file); $password = trim($password); if($hash == md5($password)){ echo "" . $hash . ":" . $password . "
"; } } echo "

Finished
"; fclose($file); } else{ echo "Invalid MD5 hash
"; exit(); } } if(isset($_POST['tword'])){ $word = $_POST['tword']; $dfile = "passes.txt"; echo "
Submitting word - " . $word . "
"; dupcheck($dfile,$word); $file = fopen($dfile,"a") or exit("Couldn't open " . $dfile); fwrite($file,$word . "\n"); fclose($file); } function dupcheck($lfile,$lword){ $rfile = fopen($lfile,"r") or exit("Couldn't open " . $lfile); while(!feof($rfile)){ $rword = fgets($rfile); $rword = trim($rword); if($rword == $lword){ exit("

Duplicate found - " . $lword); } } fclose($rfile); } ?>