[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] CGi SCripts not working? IP Address



Hello Clint,

> #!/usr/bin/perl
> print "Content-type: text/html \n\n";
> print "$ENV{'REMOTE_HOST'}";
> exit;

There's nothing wrong with the script, the RaQs don't output the environment
variable REMOTE_HOST. The equivalent is REMOTE_ADDR so you'll need to us
this on the RaQs instead. You can find out all the environment variables by
using:

#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "<table>\n";
foreach $key (keys %ENV) {
        print "<tr><td>$key </td><td>$ENV{$key}</td></tr>\n";  
}
print "</table>\n";
exit;

Regards,
Jonathan Michaelson

Way to the Web Ltd
Commercial CGI Scripting, Web Hosting
http://www.waytotheweb.com