click here for a plain text version
#!/usr/bin/perl
#
# print last ip address (handy cgi script)

require '/var/ipcop/general-functions.pl';
require "${General::swroot}/header.pl";
&Header::showhttpheaders();

print "<html><head><title>Previous External IP</title><body>";

# get previous ip from the record file..
if (open(FILE, "/var/ipcop/red/last-ipaddress")) {
    my $lastip = join("", <FILE>); 
    close FILE;
    print "Previous IP:<br />\n";
    print $lastip
} else {
    print "no previous ip address record exists<br />\n";
}
print "</body></html>";
back to the source menu
test

Welcome to corz.org!

I'm always messing around with the back-end.. See a bug? Wait a minute and try again. Still see a bug? Mail Me!