Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

input on the most efficient php counter?

11:12 pm on Mar 12, 2008 (gmt 0)

Full Member

10+ Year Member

joined:June 24, 2004
posts: 202
votes: 0

I am looking for some input on what others think would be the most efficient route for a unique page counter, files or DB?

One thought was utilizing JavaScript to make a remote call to a php script which updates a unique file, then returns the new COUNTER STAT NUMBER for display. This way search spiders, non-javascript browsers,etc. donít increment the counter number. Another advantage to this would be the page can load without any lag time (I think) from the javascript making the remote call?

I believe ebay's listings work in a similar fashion.

Any other suggestions?

12:22 am on Mar 13, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Jan 16, 2007
votes: 0

I usually lean toward db solutions but for this a file would probably be faster.
The javascript is a good thought.