I think you should use GeoIP Country - http://www.maxmind.com/app/country Alternatively you can find information about how to implement the same functionality in PHP on http://www.phptutorial.info/iptocountry/identification_of_specific_countries.html That's awsome!
seriously what do you want to block those country, what makes you think that your website is so good that those people want to visit it? I highly doubt that they will visit it, so don't worry. Spend your time and money trying to get people to your website. Also not all people from iran are bad, the governemnt is bad not the people.
ive put this into my blank .htaccess deny from .ir deny from .sa deny from .kw deny from .cn deny from .qa deny from .om Now i should be able to save lots of bw.
Oftentimes, there are valid reasons why a webmaster wants to block certain countries. Say you are selling a product / service and you think you might receive orders with fake credit cards info from countries like Nigeria, you have a good reason to block it. That's just my understanding. Anyone else?
Actually IP2Location isn't as accurate as it should/could be. For example IP2Location bases longitude/latitude on the center point of the city, instead of the location of the zip code (even though they have the zip code data). Which means in large metropolitan cities, the longitude/lattitude can be off by 40 or 50 miles. I've corresponded with the IP2Location guys about it, and it sounded like they didn't want to make the change (even though it would be more accurate) because "existing customers wouldn't like the change". Well... I'm a licensed owner of the IP2Location database, and I'm most likely going to be switching to a different database provider (one that is accurate to the zip code, instead of just city) because of it.