
steveJ
Deleted
Mar 3, 2000, 8:12 PM
Post #1 of 7
(2118 views)
|
Help With Counter Script
|
Can't Post
|
|
Hi, I've downloaded several counter scripts and when I try to implement them I get the following message: < HTTP/1.1 200 OK Date: Sat, 04 Mar 2000 04:41:20 GMT Server: Microsoft-IIS/4.0 Content-type: text/plain 82 people have visited this page since It keeps track and prints the number, but for some reason it prints all that extraneous stuff at the beginning. I'm not a perl programmer at all and I'm stumped. The code looks something like this: if($valid_domain =~ /$ENV{'HTTP_HOST'}/) { open (COUNT, "<$data_file"); flock(COUNT, 2); read (COUNT, $iCounter,10); flock(COUNT, 8); close (COUNT); $iCounter++; open (COUNT, ">$data_file"); flock(COUNT, 2); print COUNT "$iCounter"; flock(COUNT, 8); close (COUNT); print "Content-type: text/html\n\n"; print "$iCounter"; } else { #print "Content-type: text/html \n\n"; print "<b>ERROR ($ENV{'HTTP_HOST'} not valid)</b>"; } If I # out the print "Content-type then nothing at all is printed out. Does anyone have any clues? Thanks!!!
|