Thanks Dismounted,
Hooked it at global_start and used vbsetcookie (coz set_cookie doesn't work).
Below is the code I used just incase it helps anyone else.
PHP Code:
if (!isset($_COOKIE['GeoIP'])) {
// put geo locating code here
include("geoip.php");
$countryCode = getCountryCode($_SERVER['REMOTE_ADDR']);
// set cookie
vbsetcookie("GeoIP",$countryCode,permanent);
} else {
$countryCode = $_COOKIE['GeoIP'];
}