?
Solved

Hit Counter

Posted on 2001-07-26
4
Medium Priority
?
189 Views
Last Modified: 2013-12-25
I'm curious how I would create a web counter using perl/cgi...

Anyone have any suggestions?

I don't need anything fancy, don't care about IP checking...

Thanks!
0
Comment
Question by:rockies1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 6

Accepted Solution

by:
holli earned 400 total points
ID: 6324654
use Fcntl qw(:DEFAULT :flock);

sysopen (FH, "counter.dat", O_RDWR | O_CREAT, O666) or die "cannot write to counter: $!";
flock (FH, LOCK_EX) or die "flock-error: $!"; #lock the file

#read counter data here, increase it and write it back to file here

flock (FH, LOCK_UN) or die "flock-error: $!"; # unlock the file

close FH;



0
 

Expert Comment

by:kplonk
ID: 6328658
Do you have access to a data base to hold the counst or gust files on your server
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6699405
Please update/finalize this question.

Thanks,

Moondancer
Community Support Moderator @ Experts Exchange
0
 
LVL 1

Expert Comment

by:Computer101
ID: 6903909
Comment from expert accepted as answer.

Thank you
Computer101
E-E Moderator
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question