I noticed a huge outbreak in goddamn autosurfers on my TGP lately... so I wrote a little script to send them to localhost hell... See below for solution:
Here is the script: bounce.php
If your main page is php (ie: index.php) you can include in the top of you page like this:
if your main page is shtml (ie: index.shtml) you can include in the top of you page like this:
if you main page in just plain html you will either have to rename your page to either .php (ie: index.html -> index.php) or .shtml (index.html -> index.shtml)
Here is the script: bounce.php
Code:
<?php
//banned urls
$urls[0]='http://www.surfbuster.net';
$urls[1]='surebuster.net';
$urls[2]='http://www.adultautosurf.com';
$urls[3]='adultautosurf.com';
$urls[4]='http://www.autovisiteur.com';
$urls[5]='autovisiteur.com';
$ref=strtolower(getenv("HTTP_REFERER"));
//url to send them to
$url="http://127.0.0.1:80";
if(in_array($ref, $urls)){
//bounce motherfucker bounce
header('Location: '.$url);
}
?>
Code:
<?php include('bounce.php'); ?>
Code:
<!--#include virtual="bounce.php" -->


Comment