How could I prevent users from certain countries from uploading?
I've noticed a lot of...suspicious activities from a few countries, so I'd like to "blanket ban" those countries (similar to how plentyoffish prevents users from certain countries from uploading their pics).
Would this just be a matter of hardcoding IP address ranges, and 开发者_如何学JAVAchecking against that? Are there any examples of this in PHP?
A great resource for detecting countries by IP with PHP can be found from PHPTutorial.info. Uses text files for IP ranges and thus is very simple to set up - no database setup or data import needed.
精彩评论