#!/usr/bin/perl

$> = $<;  # set effective user IDs to real id
$) = $(;  # set goup id to real id

$ENV{'PATH'} = '/bin:/usr/bin';
$ENV{'IFS'} = '' if $ENV{'IFS'} ne '';

$asin=$ENV{'QUERY_STRING'};
#Stop nasty subshell stuff that could crop up...
$asin =~ s/~!/ ~!/g;

$time=time;
$date=localtime $time;
$ip = $ENV{'REMOTE_ADDR'};
$page = $ENV{'HTTP_REFERER'};

#log to a file
open(OUTPUT,">>amazon.dat");
print OUTPUT "$asin|$ip|$date|$page\n";
close(OUTPUT);

print "Location: http://www.amazon.com/exec/obidos/ASIN/$asin/funguitheinterne\n\n"

