Geeks With Blogs
My lessons learned while developing! March 2011 Entries
Allowing or blocking ip addresses with PHP and mySQL based off of what country they are from
Ok here is a cool trick I figured out that I hope will be helpful to someone: What if you wanted to block all the incoming ip addresses from a given country to a given site using only PHP and mySQL (without using .htaccess, etc.) and be able to log who you blocked into your mySQL database? First, you need to have a white list or a black list. I got mine from because they were free, based off of countries and worked pretty darn well. For myself, I used the x.x.x.x-y.y.y.y ......

Posted On Wednesday, March 30, 2011 3:12 PM

Copyright © robertphyatt | Powered by: