Script to limit amount of hits/views per day?

cheesecake

Regular Member
Joined
Jan 12, 2009
Messages
270
Reaction score
232
I know this requires mysql.

I need this because I'm going to buy some junk traffic and I want to limit the traffic to exactly 200 UNIQUE hits a day. No more, no less.

I have a script that will limit the amount of times a certain ip can view my site per day (dropping the table with cron once a day) but how do I make it to limit the total amount of hits?

Basically:

Limit total UV hits per day. Not counting double hits from same ip, etc...


Any help guys?

Thanks.
 
If your already tracking hits, just have a query something like "SELECT DISTINCT (ip) FROM table"
if ammount of rows is > 200, die(); or however you want to do it.
 
Back
Top