#!/usr/bin/perl

use strict;

print "Content-type: text/html\n\n\n\n";

my $File = "/home/web1/public_html/IP.txt";
open(FILE,"/home/web1/public_html/IP.txt");
my $Line = <FILE>;
chomp $Line;
close FILE;

my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
   $atime,$mtime,$ctime,$blksize,$blocks)
     = stat($File);
my $time = time();

print "<br> Last known ip address was $Line\n";
print qq(<br> To transfer to the website, 
     <a href="http://$Line">click here</a>\n);

my $Diff = $time - $mtime;
if ($Diff > 4000) 
  {
  print "<p>ERROR: The ip address should have been updated once an hour, 
  but 4000 seconds has past since the last update.
  <br> $time - $mtime = $Diff \n";
  }

