function pc_randomint($max = 1) {
$m = 1000000;
return ((mt_rand(1,$m * $max)-1)/$m);
}
$line_number = 0;
$fh = fopen('/www/www.ukrifter.com/generators/buzzword/intro1.txt','r') or die($php_errormsg);
while (! feof($fh)) {
if ($s = fgets($fh,1048576)) {
$line_number++;
if (pc_randomint($line_number) < 1) {
$intro1 = $s;
}
}
}
fclose($fh) or die($php_errormsg);
$line_number = 0;
$fh = fopen('/www/www.ukrifter.com/generators/buzzword/intro2.txt','r') or die($php_errormsg);
while (! feof($fh)) {
if ($s = fgets($fh,1048576)) {
$line_number++;
if (pc_randomint($line_number) < 1) {
$intro2 = $s;
}
}
}
fclose($fh) or die($php_errormsg);
$line_number = 0;
$fh = fopen('/www/www.ukrifter.com/generators/buzzword/intro3.txt','r') or die($php_errormsg);
while (! feof($fh)) {
if ($s = fgets($fh,1048576)) {
$line_number++;
if (pc_randomint($line_number) < 1) {
$intro3 = $s;
}
}
}
fclose($fh) or die($php_errormsg);
$line_number = 0;
$fh = fopen('/www/www.ukrifter.com/generators/buzzword/intro4.txt','r') or die($php_errormsg);
while (! feof($fh)) {
if ($s = fgets($fh,1048576)) {
$line_number++;
if (pc_randomint($line_number) < 1) {
$intro4 = $s;
}
}
}
fclose($fh) or die($php_errormsg);
$line_number = 0;
$fh = fopen('/www/www.ukrifter.com/generators/buzzword/intro5.txt','r') or die($php_errormsg);
while (! feof($fh)) {
if ($s = fgets($fh,1048576)) {
$line_number++;
if (pc_randomint($line_number) < 1) {
$intro5 = $s;
}
}
}
fclose($fh) or die($php_errormsg);
print ("
$intro1 $intro2 $intro3 and $intro4 $intro5
");
?>
If you liked this you will LOVE the Random Movie Plot and Random Corporate Slogan generators. And DON'T MISS The Corporate Mission Statement Generator - helping you win the rat race one idiotic buzzword packed statement at a time.