Results 1 to 10 of 12
how would i make a counter to see how many people log onto my page...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-06-2003 #1Linux User
- Join Date
- Apr 2003
- Location
- TEXAS
- Posts
- 314
page counter
how would i make a counter to see how many people log onto my page
The computer made me do it!! Slackware
and SUSE too Gig\'em WHOOOOP!!
\"God put me on this earth to accomplish a certain amount of tasks, At the rate I\'m going I will never die.\" (I don\'t know)
- 06-06-2003 #2Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
To make a text one, just write a PHP page that retrieves the number from a text file somewhere in your file system, and then increases it by one and stores it.
- 06-06-2003 #3Linux User
- Join Date
- Apr 2003
- Location
- TEXAS
- Posts
- 314
what function
what function writes a file
The computer made me do it!! Slackware
and SUSE too Gig\'em WHOOOOP!!
\"God put me on this earth to accomplish a certain amount of tasks, At the rate I\'m going I will never die.\" (I don\'t know)
- 06-07-2003 #4Just Joined!
- Join Date
- Jun 2003
- Location
- Helsinki, Finland
- Posts
- 78
Check out the great php documentation for fopen and go from there.
- 06-07-2003 #5Linux Engineer
- Join Date
- Apr 2003
- Location
- Sweden
- Posts
- 796
Are you using a database for your website??
RegardsRegards
Andutt
- 06-07-2003 #6Linux Engineer
- Join Date
- Apr 2003
- Location
- Sweden
- Posts
- 796
If you are using a database i can show you how to build an easy sitecounter.... in PHP.
Regards
Andutt
- 06-07-2003 #7Linux User
- Join Date
- Apr 2003
- Location
- TEXAS
- Posts
- 314
sure
i have access to a data base would that be better
also i dont really want some one to hit refresh and heve them be counted every time they hit refresh
i think that would include sessions which i learning about
correct me if im wrong pleaseThe computer made me do it!! Slackware
and SUSE too Gig\'em WHOOOOP!!
\"God put me on this earth to accomplish a certain amount of tasks, At the rate I\'m going I will never die.\" (I don\'t know)
- 06-08-2003 #8Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
To have page counters use sessions would certainly be great, but it can be misleading as well. You'll have to remember that in that case, it will count visits, not hits, so you'll be looking at a much lower count.
- 06-08-2003 #9Linux User
- Join Date
- Apr 2003
- Location
- TEXAS
- Posts
- 314
ok so if i dont use sessions sould the count count higher every time someone presses the refresh button so the count would be much higher than the auctuall number it should be right.
The computer made me do it!! Slackware
and SUSE too Gig\'em WHOOOOP!!
\"God put me on this earth to accomplish a certain amount of tasks, At the rate I\'m going I will never die.\" (I don\'t know)
- 06-08-2003 #10Linux Engineer
- Join Date
- Apr 2003
- Location
- Sweden
- Posts
- 796
Thats correct...if you have an easy pagecounter hitcounter it will be updated everytime the page are being refreshed, but its like Dolda says if you want a hitcounter or a session hitcounter...its quite easy to fix both.
But its a litte more work to fix a sessionhitcounter.
RegardsRegards
Andutt


Reply With Quote
