Gossamer Forum
Home : Products : Links 2.0 : Discussions :

$ENV('REMOTE_ADDR'} problem when modifying

Quote Reply
$ENV('REMOTE_ADDR'} problem when modifying
I add three fields in link.def called IP; Domain; Host, this field will be hiddenly added thru the add.html using
<%IP%> , <%Host%> & <%Domain%>, it works fine in add.html but if a user mofify their submission this information will not be overwrited with the new IP, Domain & Host, how to overwrite this info when a user modify a submission?

This is just for reference.

in site_html_template.pl I added the following:

# USED BY: gethostbyaddr
use Socket;

my $ipaddress = $ENV{'REMOTE_ADDR'};
my $hostname = scalar(gethostbyaddr(inet_aton($ipaddress), AF_INET));
my $hostdomain = $1 if $hostname =~ /.*\.([^.]*\.[^.]*)/;

print &load_template ('add.html', {
IP => $ipaddress,
Domain => $hostdomain,
Host => $hostname,

The information above is what I add, not the full add_form.

Thanks in advance,

Nuno Duque
Macau Search Engine
Subject Author Views Date
Thread $ENV('REMOTE_ADDR'} problem when modifying nduque 872 Oct 3, 2000, 10:40 AM
Thread Re: $ENV('REMOTE_ADDR'} problem when modifying
Stealth 833 Oct 3, 2000, 6:08 PM
Post Re: $ENV('REMOTE_ADDR'} problem when modifying
nduque 828 Oct 3, 2000, 11:42 PM