开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜