I operate a server that hosts a proxy, but then my revenue is being decreased by Iraq, Iran, and Saudi Arabia users that just use bandwidth, becuase ads don't pay as much for those users. So, I'd like to block those users, and I remember seeing a site that automatically generated a .htaccess file when you specified what country you'd like to block. Anyone have any pointers?
You could try searching the iptocountry db then implement a script that will query the database.... google keyword= "Ip2country database webhosting"