Beginning - for any unlisted
If your site engine not listed here you can add spamtrap.org.ua feature to your site by yourself. It's relatively simply but you need a some practice of source code editing.
Step-by-step.
  1. At this moment spamtrap.org.ua libs exsist for 2 languages:PHP and Perl. Download file that correspond your site engine language then unzip and put into your site's directory.
  2. Find "Entrance point", script which called always and first (ideally) or at least most often and|or most first. Mostly it is index.php, main.php, and so on. Sometimes you can use config(uration).php If you use counters like bbclone you just can put our code before counter's call (of course if you don't like to count spam-bots too :) Main reason is checking visitor's IP as early as possible witout spending CPU and connection resources.
  3. The Code. For PHP:
    //spamtrap.org.ua start
    define("SPAMTRAP", "/full/path/to/spamtrap.php");  
    
    // spamtrap_karma - it is threshold - how much "dirty" users can visit 
    // your site. You free to change this constant, so the higher value is, 
    // the more bots you accept.
    // It's strongly recommended to use value greater than 3.
    $spamtrap_karma = 4;
    
    if (is_readable(SPAMTRAP)) include(SPAMTRAP);  
    
    $response = spamtrap($_SERVER["REMOTE_ADDR"]);
    
    //For debug purpose
    //echo "<h1>$response (".$_SERVER["REMOTE_ADDR"].")</h1>";	
    
    if ($response>$spamtrap_karma) {	
    	echo "Spambots are not alloved to visit";
    	exit;
    }
    //spamtrap.org.ua end
    
    Code for Perl:
    require '/full/path/to/spamtrap-lib.cgi';
    
    
    # spamtrap_karma - it is threshold - how much "dirty" users can visit 
    # your site. You free to change this constant, so the higher value is, 
    # the more bots you accept.
    # It's strongly recommended to use value greater than 3.
    $spamtrap_karma = 4;
    
    $st_res = &spamtrap(0);
    
    #For debug purpose
    # print "<h1>spamtrap.org.ua response: $st_res</h1>";     
    
    if ($st_res > $spamtrap_karma) {
    	print "Spambots are not alloved to visit"; 
    	exit;
    }
    
  4. How to check: Uncomment debug line and visit your site. "Clean" IP has 0 value of "karma". Responce value "-1" mean error.
Last Updated ( Thursday, 07 June 2007 )