Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Wondering if there are any good ideas on how to make a feature to limit site visits (per month). It is for an app that uses client-based subdomains, or "wildcards". My initial thoughts are that the visit-count logic will have to be within PHP. I am thinking once a limit is hit (for the month), a config file is overwritten for Apache, disallowing anymore traffic to the particular subdomain. This way, any type of extreme traffic basically bounces off the server, instead of getting to the app itself, and initiating any of the logic/SQL queries.

I would anticipate a cron would reset the Apache file, and the view counts in the database. What do you think for a simple count limiter? Any other ideas? Thank you!

share|improve this question

migrated from stackoverflow.com May 17 '11 at 16:48

This question came from our site for professional and enthusiast programmers.

1 Answer 1

I woudn't complicate this with modifying apache config files. If you put the check at the beginning of your code things should work fine.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.