Simple text hit counter

Started on the old forum in March 2010 · view the original in the archive · old links redirect here

5 replies · 497 views · started 16 years ago · 1 min read

4 participants
triplee084 Junior · 30 posts #1

I have been trying since morning to create a simple php total hits like sharemobile. But it not just working can anybody help me

khan Lead · 681 posts #3

just create today.txt and chmod this to 777.and then write these line into ur index page or wherever u want to show this counter.

$today= "1"; $fp = @fopen("today.txt", "a"); @fputs($fp, "$today"); @fclose($fp); $stat_count = @filesize("today.txt"); echo "Total Visitor : $stat_count"; THATS IT.BE SURE TO CHMOD TO 777.

WhiteWarrior Principal · 1,419 posts #4

khan89 wrote: just create today.txt and chmod this to 777.and then write these line into ur index page or wherever u want to show this counter.

$today= "1"; $fp = @fopen("today.txt", "a"); @fputs($fp, "$today"); @fclose($fp); $stat_count = @filesize("today.txt"); echo "Total Visitor : $stat_count"; THATS IT.BE SURE TO CHMOD TO 777.

Does not count unique visit's, i could click your index and use an auto refresher just to "bump" the hit counts up.

WhiteWarrior Principal · 1,419 posts #5

khan89 wrote: just create today.txt and chmod this to 777.and then write these line into ur index page or wherever u want to show this counter.

$today= "1"; $fp = @fopen("today.txt", "a"); @fputs($fp, "$today"); @fclose($fp); $stat_count = @filesize("today.txt"); echo "Total Visitor : $stat_count"; THATS IT.BE SURE TO CHMOD TO 777.

Does not count unique visit's, i could click your index and use an auto refresher just to "bump" the hit counts up.

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close