#!/usr/bin/perl -wT use strict; $|++; use CGI qw/:standard /; use CGI::Cookie; # dont allow that tiny script to crack this server $CGI::DISABLE_UPLOADS = 1; # set this to a reasonable high amount preventing server attacks with posting hughe files $CGI::POST_MAX = 15000; # please identify, somehow my $usrPc = remote_host(); # if you've been here before, tell me, as whom you identified my $usrWasLast = (cookie('ID'))? cookie('ID'):'none'; # what kinda browser ? my $usrAgent = user_agent(); # well, get a cookie, please accept it, and if not, I don't need that info from you anyway :-) my $hiddenInfo = new CGI::Cookie( -name=>'ID', -value=>$usrPc, -expires=>'+3M', -domain=>'little.perlmonk.org' ); my $referrer = param('ref') if (param('ref')); # now give the browser what it requested print header( -charset=>'iso-8859-1', -cookie=>[$hiddenInfo] ); print start_html( -dtd=>'-//W3C//DTD HTML 4.01 Transitional//EN', -lang=> 'en', -title=> 'yourPageTITLE' ); print p(($usrWasLast)? "You've been here before using IP: " . $usrWasLast : "I don't know you."); print p('You have followed a link to this site from' . $referrer) if defined $referrer; print end_html(); # 1;