#!/usr/bin/perl # # Ad Click-Through Redirection # Ken Wronkiewicz (wh@wirewd.com) # # Version 1.00 - Inital release - Ken Wronkiewicz(wh3947a@tso.cin.ix.net) # Version 1.01 - Cosmetic Changes - Ken Wronkiewicz(wh3947a@tso.cin.ix.net) # Version 1.02 - Little changes - Ken Wronkiewicz(wh@wirewd.com) # # Docs on http://www.wirewd.com/wh/cgi.html # # Set up the variables # $Rhost = $ENV{'REMOTE_HOST'}; $Rip = $ENV{'REMOTE_ADDR'}; # # Configuration Settings # $Redirect = 'http://www.adomonde.net/'; # URL to redirect to $Logfile = 'http://www.adomonde.net/banners/logfile1.txt'; # File to log to $Id = 'AD#1'; # ID to use in the logfile. # # # Log the access # # Open the logfile open(LOG,">>$Logfile"); # Grab the time ($Ssec,$Min,$Hour,$Mday,$Mon,$Year,$Wday,$Yday,$IsDst) = localtime(time); # Enter it into the logfile print(LOG "$Rhost [$Rip] - $Mday/$Mon/$Year $Hour:$Min - $Id\n"); # Close the logfile close(LOG); # Redirect the user print("location:$Redirect\n\n");