Note that vbsetcookie() will add your cookie prefix to the cookie, so it actually should be:
PHP Code:
if (!isset($_COOKIE[COOKIE_PREFIX . 'GeoIP']))
{
// put geo locating code here
include('./geoip.php');
$countryCode = getCountryCode($_SERVER['REMOTE_ADDR']);
// set cookie
vbsetcookie('GeoIP', $countryCode, permanent);
}
else
{
$countryCode = $_COOKIE[COOKIE_PREFIX . 'GeoIP'];
}