Yes. To block access to your website at some countries, you need to obtain ip to location database (there are even free ones available). You can add the access logic to the server or to the separate pages. To add it to the web server, you can use MaxMind service.
yes you can block your website in china by cpanel, just contact to your hosting company and request them to block it
I'm really not sure why you are banning traffic from China. You have the benefit to allow your site to be accessed from anywhere, so why prevent that? I think you can implement some other features on your site to fight spam rather than blocking off an entire country of hundreds of millions of people...
There is lots of solution for stopping spam . but do not restrict country may be you will loss business.
It's quite easy. However, you need to have a list of IPs (or IP classes) and put a code like this in your header: if (isBanned($_SERVER["REMOTE_ADDR"])) { die("You have been banned."); } Code (markup): You can do this via .htaccess too or via your firewall.
hey banning a whole country is not good, you will lose a lot of traffic as china has a huge population and those guys can make the ipad3 even before apple releases it..
Huh? Are you ALLOWING them to put spam ON YOUR WEBSITE? Looks like to me that you need to fix the SECURITY of your website. Blocking China will NOT stop the spam, just slow it down. Fixing your SECURITY will stop the spam.
Try reCaptcha or something and dont ban the whole country or you will loose a great traffic, dont you think so ?