<?php

## don't do anything for 0.5-2.1 seconds - make the spambot wait
##
sleep(rand(50, 210)/100);

?><html><head>
<meta name="robots" content="noindex,nofollow">
</head><body>
<p>
<?php

#################################################
## honeypot v1.31                              ##
## http://Business-PHP.com/scripts/honeypot/   ##
## spambot trap                                ##
##                                             ##
## should run on PHP 4.1.0 or later            ##
## tested on PHP 4.2.3                         ##
##                                             ##
## Copyright (C) 18 Feb 2003 Atom Emet         ##
## Atom*Business-PHP.com                       ##
##                                             ##
## This program is free software; you can      ##
## redistribute it and/or modify it under the  ##
## terms of the GNU General Public License as  ##
## published by the Free Software Foundation;  ##
## either version 2 of the License, or         ##   
## (at your option) any later version.         ##
##                                             ##
## This program is distributed in the hope     ##
## that it will be useful, but WITHOUT ANY     ##
## WARRANTY; without even the implied warranty ##
## of MERCHANTABILITY or FITNESS FOR A         ##
## PARTICULAR PURPOSE. See the GNU General     ##
## Public License for more details.            ##
##                                             ##
## You should have received a copy of the      ##
## GNU General Public License along with this  ##
## program; if not, write to                   ##
##    the Free Software Foundation, Inc.       ##
##    59 Temple Place - Suite 330              ##
##    Boston, MA  02111-1307, USA              ##
#################################################

########################################################
## if you can use .htaccess files on your server,     ##
## set the "htaccess_enabled" variable to 'yes'.      ##
##                                                    ##
## if you can NOT use .htaccess files on your server, ##
## set the "htaccess_enabled variable to 'no'.        ##
########################################################
$htaccess_enabled = 'yes';


## function to generate a random string of alphanumeric characters.
##
function gen_rand() {
	$cut  = rand(10, 27);
	return substr(eregi_replace("[^a-z0-9]", '', crypt(rand())), "$cut");
}

## function that gives 4:1 odds of generating some random letters and spaces
##
function rand_text() {
	if(rand(1, 4) > 1) {
		for($x = 0; $x < 2; $x++) {
			echo(ereg_replace('[0-9]', ' ', gen_rand()) . ' ');
		}
	}
}

## function that gives 4:1 odds of generating links to more spambait addresses
##
/*
 ****************************************************************************
 * the '.htm' in this function serves no purpose,                           *
 * other than making it appear that the page is a static '.htm' page.       *
 * feel free to replace the '.htm' with '.html' '.php' '.pl' '.cgi', etc... *
 ****************************************************************************
 */
function rand_link($htaccess_enabled) {
	if(rand(1, 4) > 1) {
		$page = ereg_replace('/index.php$', '', $_SERVER[PHP_SELF]);
		if("$htaccess_enabled" == 'yes') {
			$link = $page . '/' . gen_rand() . '.htm' ;
		} else {
			$link = $page . '/?' . gen_rand() . '.htm' ;
		}
		echo("<a href=\"${link}\">".gen_rand()."</a> ");
	}
}

## function that gives 2:1 odds of generating random email addresses
##
function rand_address() {
	if(rand(1, 2) > 1) {
		$address = gen_rand() . '@' . gen_rand() . '.com';
		echo("<a href=\"mailto:${address}\">${address}</a> ");
	}
}

## display between 10 and 50 random email addresses and random links and random text
##
$count = rand(10, 50);
for($m = 0; $m < $count; $m++) {
	rand_text();
	rand_address();
	rand_text();
	rand_link($htaccess_enabled);
	rand_text();
	rand_address();
	rand_text();
	echo("<br>\n");
}

?>
</body>
</html>