雖然的確是要考試，但又忍不住手去改程式 (天啊，我是否真的應轉讀 CS？) 經過試用 SESSION 及 COOKIES 的屢戰屢敗後，結果用了原始的方法：開個 TXT 檔來記錄最近的訪客 IP 及其時間。因為可能其他地方的網友亦有這種需要，所以下文用英文，請見諒。
Counterize is a WordPress Plugin, as a page-hit-counter. It counts every page hit, and provides many useful functions, such as getting total hit, hit from current user, today’s hit etc. But one thing is that it is not based on SESSION, and can’t ignore multiple hits from a recent user. I’ve done a little modification to archieve this. If you need this function, just do the same to your wordpress.
Let me have a better explain on the function of modification. With original counterize, the count will keep increasing if someone keep reloading the same page. But with this modification, the count will only increase when anyone first enter the wordpress within certain period of time, say 30mins (default). That is, within 30mins (which can be adjust), the hit from the same user will not be counted again.
Here is the files for modification:
This modification is quite simple to install. Instruction (readme.htm) has been included in the zip file, and either simply upload pre-edited files for novice or code editing guide for programmer are included.
Words from me:
This modification is indeed very simple (which can be done by a programming novice like me!). I don’t know if there are bugs or problems, so please tell me if you find anything wrong. Thank you.