
steelrat
Deleted
May 6, 2000, 4:43 AM
Post #3 of 3
(242 views)
|
Cheers ComputerSmarts, that looks like a good start indeed; I've tried to incorporate my own server settings and path details, but I'm afraid my script 'exploded' - can you spot any glaring errors! P.S.-my username is hilesp on the college server. #!/usr/bin/perl # NOTE: make sure you create a file called # log.html and place it in the appropriate # place on your server. # ALSO: you can access this script # with server side include by entering # <!--#exec cgi="/cgi-bin/counter.cgi"--> # into whatever page you want to log from. # Hope this gives you something to at least to start # with, enjoy! # M.M. computersmarts.net print "Content-type: text/html\n\n"; ##################################################### # This is the URL of where you image is located # ##################################################### $imageurl = "http://www.sbu.ac.uk/~hilesp/images/log.gif"; ##################################################### # This is the PATH to where it will store the IP's # ##################################################### $logfile = "/~hilesp/sbu.ac.uk/www"; # NO FORWARD / ##################################################### # And here is the script in action # ##################################################### open(DOC,">>$logfile/log.html") | | die $!; print DOC "<p>$ENV{'REMOTE_ADDR'}</p>"; close(DOC); # printing to the HTML file print "<p><img border=\"0\" src=\"$imageurl\"></p>"; # displaying image for all the world to see. [don't remove \'s] exit;
|