#!/usr/bin/perl use CGI ':standard'; use CGI::Carp 'fatalsToBrowser'; #print header; $t = param("t"); $r = param("r"); $script_path = ".".$ENV{"SCRIPT_NAME"}; $script_path =~ s#[^/]+$##s; #$script_path = $ENV{"PATH_TRANSLATED"}; #$script_path =~ s#[^\\]+$##s; #($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time+17*60*60); #($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(time+11*60*60); $mon++; $year -= 100; print "Content-type: image/gif\n"; print "Expires: Mon, 26 Jul 1997 05:00:00 GMT\n"; print "Last-Modified: $wday, $mday $mon $year $hour:$min:$sec GMT\n"; print "Cache-Control: no-cache, must-revalidate\n"; print "Pragma: no-cache\n\n"; #$tm = gmdate("d.m.y H:i:s (D)", time()+11*60*60); # " - hs: ". (isset($_SERVER['REMOTE_HOST'])?$_SERVER['REMOTE_HOST']:"na") . # " - hs: ". (isset($_SERVER['REMOTE_ADDR'])?gethostbyaddr($_SERVER['REMOTE_ADDR']):"na") . use Socket; $iaddr = inet_aton($ENV{'REMOTE_ADDR'}); $hostname = gethostbyaddr($iaddr, AF_INET); open F, ">>${script_path}Xlogs/visitorsII.log.txt"; print F "$mday.$mon.0$year $hour:$min:$sec" . " -- ip: ". $ENV{'REMOTE_ADDR'} . " -- hs: ". $hostname . " - rf: ". $ENV{'HTTP_REFERER'} . " - rec: ". $t . " - ref: ". $r . " \t\t - sr: ". $ENV{'SERVER_NAME'} . " - uri: ". $ENV{'REQUEST_URI'} . " - scr: ". $ENV{'SCRIPT_NAME'} . " - qry: ". $ENV{'QUERY_STRING'} . " \t - br: ". $ENV{'HTTP_USER_AGENT'} . "\n" ; # " - r: ". $_REQUEST['r'] . # " - t: ". $_REQUEST['t'] ."\n" ; #print F "$mday/$mon/$year, $hour:$min:$sec \t - IP: ".$ENV{"REMOTE_ADDR"}." \t - page: ".$ENV{"HTTP_REFERER"}." \t - rec by: $t \t - came from: $r\n"; close F; print unpack('u', qw|K1TE&.#EA`0`!`(```/\``````"'Y!```````+``````!``$```("1`$`.P``|); #undef $\; #open F, "${script_path}img/pixel.gif"; #print ; #close F; exit;