Voodoo Jai Posted July 4, 2008 Share Posted July 4, 2008 How can I limit the number of time someone accesses my db without them registering. Could I read the ip address and then store it and allow users to access it a specific number of times based on ip address. I dont know if this could be done or how to do it. If someone could give me some more details that would be great. VoodooJai Link to comment https://forums.phpfreaks.com/topic/113276-solved-ristricting-the-number-of-db-reads/ Share on other sites More sharing options...
mwasif Posted July 6, 2008 Share Posted July 6, 2008 What do you mean by DB reads? If you are concerned about a MySQL user, then you can set the SELECT limit on MySQL user. But if you are talking about your site access, then you can count number of hits from a sepecific IP or save a cookie on client side and count the hits with its help. Link to comment https://forums.phpfreaks.com/topic/113276-solved-ristricting-the-number-of-db-reads/#findComment-582737 Share on other sites More sharing options...
Voodoo Jai Posted July 6, 2008 Author Share Posted July 6, 2008 I think the counting hits from a specific IP would sort my problem out. What would I need to do. VoodooJai Link to comment https://forums.phpfreaks.com/topic/113276-solved-ristricting-the-number-of-db-reads/#findComment-582803 Share on other sites More sharing options...
ohdang888 Posted July 6, 2008 Share Posted July 6, 2008 $ip=$_SERVER['REMOTE_ADDR']; and store ip address... but, word the wise, if you're doing this to to stop spammers or hackers, this is not the way. Ip addresses can change, and spammers and hackers know how to change them. Link to comment https://forums.phpfreaks.com/topic/113276-solved-ristricting-the-number-of-db-reads/#findComment-582863 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.