- dirname: documentation ( source)
- mt_rand: documentation ( source)
- file: documentation ( source)
<?php
/*
Based on:
//
-------------------------------------------------------------------
quick script to grab a random BOFH excuse.
- Peter Lowe // pgl@yoyo.org // http://pgl.yoyo.org/bofh/
credit to Jeff Ballard <ballard@NOSPAMcs.wisc.edu> for the original
bofh excuse server: http://www.cs.wisc.edu/~ballard/bofh/
-------------------------------------------------------------------
[2004-08-28] odd:
http://wiki.asleep.net/BOFHInetdPHP?show_comments=1
http://pgl.yoyo.org/bofh/ripoff.html (local copy)
someone's ripped off this code and signed it with
"author A.Sleep <a.sleep@asleep.net>"
it's not exactly the same, but it's definitely based off this code.
how strange. oh well.
-------------------------------------------------------------------
//
Secure, memorizable password generator
*/
$adj = dirname(__FILE__).'/adj.lst';
$noun = dirname(__FILE__).'/noun.lst';
for ($turn = 1; $turn <= $_POST["itr"]; $turn++){
if (!$adj = @file($adj)){
echo "couldn't read adjective file '$adj'";
}
echo $adj[mt_rand(0, count($adj)-1)];
if (!$noun = @file($noun)){
echo "couldn't read adjective file '$noun'";
}
echo $noun[mt_rand(0, count($noun)-1)];
}
?>