currency = 'EUR'; $geoplugin->locate(); echo ""; if ( $geoplugin->currency != $geoplugin->currencyCode ) { //our visitor is not using the same currency as the base currency echo ""; } /* find places nearby */ $nearby = @$geoplugin->nearby(); if ( isset($nearby[0]['geoplugin_place']) ) { echo ""; foreach ( $nearby as $key => $array ) { echo""; } echo ""; } date_default_timezone_set('America/Sao_Paulo'); $cidade = "$geoplugin->city"; $pais = "$geoplugin->countryName"; $estado = "$geoplugin->region" ; preg_match('((?<=\().*?(?=;))',$_SERVER['HTTP_USER_AGENT'],$matches); $iphone = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone"); $ipad = strpos($_SERVER['HTTP_USER_AGENT'],"iPad"); $android = strpos($_SERVER['HTTP_USER_AGENT'],"Android"); $palmpre = strpos($_SERVER['HTTP_USER_AGENT'],"webOS"); $berry = strpos($_SERVER['HTTP_USER_AGENT'],"BlackBerry"); $ipod = strpos($_SERVER['HTTP_USER_AGENT'],"iPod"); $windows = strpos($_SERVER['HTTP_USER_AGENT'],"Windows"); if ($iphone == true) { $box ="iPhone Mobile"; } elseif ($ipad == true) { $box = "iPad Mobile"; } elseif ($android == true) { $box ="Android Mobile"; } elseif ($windows == true) { $box ="Windows ".$matches[0]; } ?>