in reply to REMOTE_ADDR not working
#!/usr/bin/perl -T use strict; use warnings; use CGI qw(:standard); use CGI::Carp qw(warningsToBrowser fatalsToBrowser); use Socket; print header; print start_html("Remote Host"); my $ip = 'localhost'; my $hostname = gethostbyaddr(inet_aton($ip), AF_INET); print "Welcome, visitor from $hostname!<p>\n"; print end_html;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: REMOTE_ADDR not working
by Anonymous Monk on Jan 30, 2011 at 07:38 UTC |