To get the continent of the current visitor, just use the IP address as parameter:
<?php
$continent = geoip_continent_code_by_name($_SERVER['REMOTE_ADDR']);
?>
If you also want to support the Apache GeoIP extension:
<?php
if(isset($_SERVER["GEOIP_CONTINENT_CODE"]))
$continent = $_SERVER["GEOIP_CONTINENT_CODE"];
elseif(function_exists("geoip_continent_code_by_name") && isset($_SERVER['REMOTE_ADDR']))
$continent = geoip_continent_code_by_name($_SERVER['REMOTE_ADDR']);
else
$continent = 'unknown';
?>