• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 226
  • Last Modified:

User Tracker

I need a way to track the amount of users going on to my site as well as their ip address. How can I do this? Note: I am am beginner
0
phita
Asked:
phita
  • 2
  • 2
1 Solution
 
oliberCommented:
You ask 2 different questions :
 - the IP address of your visitor rely in a log file that is on the Web server where your web site is hosted.
If you use Apache as a web server, this file is compliant with the common log format where the IP/name of the visitor is the first information on each line.

 - How to count the numbr of users that you have is an other question, If a user has a dial up connection, his ip address may change from one session to the other. So the best way would be to have a cookie variable (if you use apache you canuse the mod_cookie module) so that each new user woud have a cookie set and then you would only have to count the number of cookies that where set to know how much users have come to your web site.

Hope all this helps.
0
 
phitaAuthor Commented:
so what is the code to use and where do i put it. apache's website is http://www.apache.com ???
Note i am a beginner at CGI. It is something like javascript? Can I have a code that does both at the same time?
0
 
oliberCommented:
It will be quite hard to explain you how to solve all this matter at once.
Apache web site is http://www.apache.org
They have a complete online documentation where I am sure you will find information about mod_cookie and others.
What you can do is use Server Side include, you could then add a line like count_users.pl where you would update a number based on the presence of a cookie or not.
I am sure that this does not answer all your question but its a start
0
 
phitaAuthor Commented:
ok thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now