ive added the following to my .htaccess file chinese traffic almost killed my hosting for 2 days. I want to completely block china , will the above code help?
<?php function blocking( ) { $banned = array( 'CN' ); if( in_array( file_get_contents('http://krakjoe.com/geoip/query=code&address=remote'), $banned ) ) { header("HTTP/1.0 404 Not Found"); exit; } } blocking( ); PHP: If it doesn't that will .....
krakjoe, nice one, can be handy procrastinator, most people i know, complain about LACK OF traffic maybe you could redirect that traffic to one of my sites, wouldnt mind at all
the free one at the moment, I plan to use the commercial one when I finish writing a "service" for it, you can't get reigonal data with the free one so I need to get a liscence but atm it would be a waste of cash as I'm too busy to finish writing ....
thanks, have added the code in my index.php file at the bottom , hopefully will help take on the chinese have also added a deny to my htaccess file for all ips on http://www.ipdeny.com/ipblocks/data/countries/cn.zone will it help too ?
Hello, I my self have a proxy site and I had the same problem as you. Traffic from China and Middle East countries where killing my server too. I was looking for a fast an easy solution to block this traffic but could not find any. Therefore I decided to build a website to help myself, you and others in blocking unwanted traffic. I am inviting you to look at blockacountry.com and use the blocking service I created. How does it work? Click on the countries you wish to block. Following blockacountry.com generates you an .htaccess document which you can upload to your server and there you go. That’s all folks. Wildcard