jrmajor
asked on
Controlling number of user searches
hi,
we are adding a php lookup/search feature on our website (lamp). This feature searches against a single table in a mysql database.
What methods can I use to limit the number of searches performed by users over a period of time e.g. 10mins?
thanks!
we are adding a php lookup/search feature on our website (lamp). This feature searches against a single table in a mysql database.
What methods can I use to limit the number of searches performed by users over a period of time e.g. 10mins?
thanks!
ASKER
my apologies for not adding this information!
no the feature will be available to all users i.e. there are no registered users.
no the feature will be available to all users i.e. there are no registered users.
Then probably the check on IP-address will be sufficient. It probably doesn't matter how many people download from the same computer, they can't work on it at the same time.
$_SERVER['REMOTE_ADDR'] gives you the IP-address, save this in the database with a download counter
$_SERVER['REMOTE_ADDR'] gives you the IP-address, save this in the database with a download counter
ASKER
ok so I would write the ip address to a table and have an autoincrement field to keep track of the number of searches.
what do you think would be best approach for checking the number of searches over a fixed period of time?
what do you think would be best approach for checking the number of searches over a fixed period of time?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In the last case you'd best track the seaches bij IP-address. Register the searches in a database.