Getting Browsers Information from HEADER
I use perl and CGI to get the HEADER informations.
I use perl template to show the HTML files.
I use PurePerl to show the IP Informations.
perl file Action.pl:
use CGI;
use Template;
use Geo::IP::PurePerl;
my $gi = Geo::IP::PurePerl->open("/usr/local/share/GeoIP/GeoIP.dat", GEOIP_STANDARD);
my $clientIp = $ENV{REMOTE_ADDR};
my $q = CGI->new;
my $actionName = $q->param('actionName');
$h = $q->header();
my $str = "";
while (my ($key,$value)=each %ENV){
$str = $str . " $key===>$value\n";
}
my $vars = {
clientIp => $clientIp,
countryCode => $countryCode,
countryName => $countryName,
records => $record_str,
ispName => $ispName,
remoteHost => $ENV{REMOTE_HOST},
remotePort => $ENV{REMOTE_PORT},
remoteUser => $ENV{REMOTE_USER},
callingPage => $ENV{HTTP_REFERER},
requestMethod => $ENV{REQUEST_METHOD},
hostServerAddress => $ENV{HTTP_HOST},
requestURI => $ENV{REQUEST_URI},
userAgent => $ENV{HTTP_USER_AGENT},
httpAccept => $ENV{HTTP_ACCEPT},
httpAcceptCharset => $ENV{HTTP_ACCEPT_CHARSET},
httpAcceptEncoding => $ENV{HTTP_ACCEPT_ENCODING},
httpAcceptLanguage => $ENV{HTTP_ACCEPT_LANGUAGE},
httpCookie => $ENV{HTTP_COOKIE},
contentType => $ENV{CONTENT_TYPE},
contentLength => $ENV{CONTENT_LENGTH},
header => $h,
actionName => $actionName,
str => $str,
};
I use perl and CGI to get the HEADER informations.
I use perl template to show the HTML files.
I use PurePerl to show the IP Informations.
perl file Action.pl:
use CGI;
use Template;
use Geo::IP::PurePerl;
my $gi = Geo::IP::PurePerl->open("/usr/local/share/GeoIP/GeoIP.dat", GEOIP_STANDARD);
my $clientIp = $ENV{REMOTE_ADDR};
my $q = CGI->new;
my $actionName = $q->param('actionName');
$h = $q->header();
my $str = "";
while (my ($key,$value)=each %ENV){
$str = $str . " $key===>$value\n";
}
my $vars = {
clientIp => $clientIp,
countryCode => $countryCode,
countryName => $countryName,
records => $record_str,
ispName => $ispName,
remoteHost => $ENV{REMOTE_HOST},
remotePort => $ENV{REMOTE_PORT},
remoteUser => $ENV{REMOTE_USER},
callingPage => $ENV{HTTP_REFERER},
requestMethod => $ENV{REQUEST_METHOD},
hostServerAddress => $ENV{HTTP_HOST},
requestURI => $ENV{REQUEST_URI},
userAgent => $ENV{HTTP_USER_AGENT},
httpAccept => $ENV{HTTP_ACCEPT},
httpAcceptCharset => $ENV{HTTP_ACCEPT_CHARSET},
httpAcceptEncoding => $ENV{HTTP_ACCEPT_ENCODING},
httpAcceptLanguage => $ENV{HTTP_ACCEPT_LANGUAGE},
httpCookie => $ENV{HTTP_COOKIE},
contentType => $ENV{CONTENT_TYPE},
contentLength => $ENV{CONTENT_LENGTH},
header => $h,
actionName => $actionName,
str => $str,
};