Stop autosurfers

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nation-x
    Confirmed User
    • Mar 2004
    • 5370

    #1

    Stop autosurfers

    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
    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);
    }
    
    ?>
    If your main page is php (ie: index.php) you can include in the top of you page like this:
    Code:
    <?php include('bounce.php'); ?>
    if your main page is shtml (ie: index.shtml) you can include in the top of you page like this:
    Code:
    <!--#include virtual="bounce.php" -->
    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)
    Last edited by nation-x; 04-27-2005, 04:11 AM.
  • twan
    Confirmed User
    • Aug 2003
    • 798

    #2
    I did not know about "autosurfers", thanks for the tip!
    i'm going to do a bit research.

    Blog Submitter, submit to 15 blog dirs with 1 form.
    Free WordPress Blog Hosting - Become a Thumblogger Affiliate!

    Comment

    Working...