What is IP Geolocation?
CloudFlare can geolocate visitors to your website and pass the country code on to you. Once enabled, we will then add an HTTP header named "CF-IPCountry" to all requests we make to your website.
Note: CloudFlare includes this information for both IPv4 and IPv6 addresses.
Would make it easy to target advertisements to specific countries without the use of robust ad server programs or additional queries to 3rd party services.
Here is the code example. Looks pretty straight forward.
$country_code = $_SERVER["HTTP_CF_IPCOUNTRY"];