Geo-targeted blocks based on visitor IP (Drupal 7)
09 June 2012
Ever needed to show one set of ads to visitors in one region and another set to those in another region?
Here's how, using Drupal 7 and the ip2country module.
2. Create or edit a block that you wish to restrict.
Here is some sample code that goes in the block's "Show block on specific pages" area. The country codes are two-letter, all-caps codes. Capitlization IS important.
Middle East / North Africa