Make your own free website on Tripod.com
#!/usr/local/bin/perl # # txcounter cgi # 2000 Jackie Hamilton - http://www.cgi101.com/ # # this cgi increments a counter in a file, then prints out a line like # "You are visitor number XXX." # HTML code to call this: # # [an error occurred while processing this directive] # # this requires server-side includes. You may need to rename your HTML # file to a .shtml extension to make it work. # # note: be sure that the counter file is set WRITABLE by the httpd # daemon owner or group. in Unix you'll need to 'chmod 775 countfile' # or possibly 'chmod 777 countfile'. $countfile = "cgicount"; $count = `cat $countfile`; chop($count); $count = $count + 1; open(INF,">$countfile"); print INF "$count\n"; close(INF); print "Content-type:text/html\n\n"; print "You are visitor number $count.

\n"; # the end.
Friday, 24-Nov-2017 11:18:46 EST
Friday, 24-Nov-2017 16:18:46 GMT
counterx.html
/cgi-bin/counterx.html
Saturday, 12-Mar-2005 15:28:30 EST
web