currency = 'EUR'; $geoplugin->locate(); echo "Geolocation results for {$geoplugin->ip}:
\n". "City: {$geoplugin->city}
\n". "Region: {$geoplugin->region}
\n". "Region Code: {$geoplugin->regionCode}
\n". "Region Name: {$geoplugin->regionName}
\n". "DMA Code: {$geoplugin->dmaCode}
\n". "Country Name: {$geoplugin->countryName}
\n". "Country Code: {$geoplugin->countryCode}
\n". "In the EU?: {$geoplugin->inEU}
\n". "EU VAT Rate: {$geoplugin->euVATrate}
\n". "Latitude: {$geoplugin->latitude}
\n". "Longitude: {$geoplugin->longitude}
\n". "Radius of Accuracy (Miles): {$geoplugin->locationAccuracyRadius}
\n". "Timezone: {$geoplugin->timezone}
\n". "Currency Code: {$geoplugin->currencyCode}
\n". "Currency Symbol: {$geoplugin->currencySymbol}
\n". "Exchange Rate: {$geoplugin->currencyConverter}
\n"; if ( $geoplugin->currency != $geoplugin->currencyCode ) { //our visitor is not using the same currency as the base currency echo "

At todays rate, US$100 will cost you " . $geoplugin->convert(100) ."

\n"; } /* find places nearby */ $nearby = $geoplugin->nearby(); if ( isset($nearby[0]['geoplugin_place']) ) { echo "

Some places you may wish to visit near " . $geoplugin->city . ":

\n"; foreach ( $nearby as $key => $array ) { echo ($key + 1) .":
"; echo "\t Place: " . $array['geoplugin_place'] . "
"; echo "\t Country Code: " . $array['geoplugin_countryCode'] . "
"; echo "\t Region: " . $array['geoplugin_region'] . "
"; echo "\t County: " . $array['geoplugin_county'] . "
"; echo "\t Latitude: " . $array['geoplugin_latitude'] . "
"; echo "\t Longitude: " . $array['geoplugin_longitude'] . "
"; echo "\t Distance (miles): " . $array['geoplugin_distanceMiles'] . "
"; echo "\t Distance (km): " . $array['geoplugin_distanceKilometers'] . "
"; } echo "
\n"; } ?>