Forum Moderators: coopster
One of my clients has a new competitor. Their store locator stops you after 5 zip code queries ("..only 4 queries per week or 8 queries per month allowed.."). They are obviously using PHP.
My client wants me to do the same for our MS-Access/ASP (Dreamweaver MX 2004) store locator database, which now has no limitations on number of ZIP, City name or Phone Area searches.
My client is convinced this new competitor, with a new clone of client's product, got useful info on client's retail distribution strategy from our database.
We are on a Windows server (obviously) on a virtual shared hosting account. Not doing anything server-side at this point (except the search and results pages).
Can we also create such a query limitation without switching to MySQL and/or away from a Windows server?
Any ideas much appreciated!
--thanks!
(edited by jc for spelling)
They need to know if there is a retail store nearby or whether to order online. Nothing like a login should get in their way. That would have an unacceptable impact on sales.
We just want to stop people from searching many ZIP codes, etc. to try to copy chunks of our database.
or you could do a query per set time limit
or you could use IP
or you could use a session to track it
I understand the issue but if you absolutely want to limit each visitor to a set number of searches then you need to be able to identify them reliably
time limits will cause problems with a busy site
ip's overlap and change
sessions can be deleted
I don't expect any method to give security as good as a password system, but do want to do something that will discourage abuse, while not discouraging shoppers.
you can get the ip with $_SERVER['REMOTE_ADDR']
check your db for a record from a given time period
if it exists and it hasnt reached max allowed then update the count in that row by 1
if it does not exist insert a row with the count set to 1
I assume your table would be something like
ip
datetime
request_count
then you could clean up old rows by using the datetime field with a cron or something
just remember AOL users are great buyers and often they will al come in on the same ip
$_SERVER['HTTP_USER_AGENT']
then if you match against IP and user agent, you'll have a better chance of identifying the user. It probably won't help much since it's possible it'll still overlap... but should help (if you are using ASP there should be something similar to find the user agent + IP).