function occurrence( $ip = '' , $to = 'utf-8' ) {
$ip = ( $ip ) ? $ip : $_SERVER [ 'REMOTE_ADDR' ] ;
$xml = simplexml_load_file ( 'http://i...content-available-to-author-only...e.ru:7020/geo?ip=' . $ip ) ; if ( $xml -> ip -> message ) {
if ( $to == 'utf-8' ) { return $xml -> ip -> message ; } else {
if ( function_exists ( 'iconv' ) ) return iconv ( "UTF-8" , $to . "//IGNORE" , $xml -> ip -> message ) ; else return "The library iconv is not supported by your server" ; } } else { if ( $to == 'utf-8' ) { return $xml -> ip -> region ; } else { if ( function_exists ( 'iconv' ) ) return iconv ( "UTF-8" , $to . "//IGNORE" , $xml -> ip -> region ) ; else return "The library iconv is not supported by your server" ; } } } echo occurrence( '' , 'utf-8' ) ;
ZnVuY3Rpb24gb2NjdXJyZW5jZSgkaXA9JycsICR0byA9ICd1dGYtOCcpewokaXAgPSAoJGlwKSA/ICRpcCA6ICRfU0VSVkVSWydSRU1PVEVfQUREUiddIDsKJHhtbCA9ICBzaW1wbGV4bWxfbG9hZF9maWxlKCdodHRwOi8vaS4uLmNvbnRlbnQtYXZhaWxhYmxlLXRvLWF1dGhvci1vbmx5Li4uZS5ydTo3MDIwL2dlbz9pcD0nLiRpcCk7CmlmKCR4bWwtPmlwLT5tZXNzYWdlKXsKaWYoICR0byA9PSAndXRmLTgnICkge3JldHVybiAkeG1sLT5pcC0+bWVzc2FnZTt9IGVsc2UgewppZiggZnVuY3Rpb25fZXhpc3RzKCAnaWNvbnYnICkgKSByZXR1cm4gaWNvbnYoICJVVEYtOCIsICR0byAuICIvL0lHTk9SRSIsJHhtbC0+aXAtPm1lc3NhZ2UpO2Vsc2UgcmV0dXJuICJUaGUgbGlicmFyeSBpY29udiBpcyBub3Qgc3VwcG9ydGVkIGJ5IHlvdXIgc2VydmVyIjt9Cn0gZWxzZSB7IGlmKCAkdG8gPT0gJ3V0Zi04JyApIHtyZXR1cm4gJHhtbC0+aXAtPnJlZ2lvbjt9IGVsc2Uge2lmKCBmdW5jdGlvbl9leGlzdHMoICdpY29udicgKSApIHJldHVybiBpY29udiggIlVURi04IiwgJHRvIC4gIi8vSUdOT1JFIiwkeG1sLT5pcC0+cmVnaW9uKTtlbHNlIHJldHVybiAiVGhlIGxpYnJhcnkgaWNvbnYgaXMgbm90IHN1cHBvcnRlZCBieSB5b3VyIHNlcnZlciI7fX19CmVjaG8gb2NjdXJyZW5jZSgnJywndXRmLTgnKTs=
stdout
function occurrence($ip='', $to = 'utf-8'){
$ip = ($ip) ? $ip : $_SERVER['REMOTE_ADDR'] ;
$xml = simplexml_load_file('http://i...content-available-to-author-only...e.ru:7020/geo?ip='.$ip);
if($xml->ip->message){
if( $to == 'utf-8' ) {return $xml->ip->message;} else {
if( function_exists( 'iconv' ) ) return iconv( "UTF-8", $to . "//IGNORE",$xml->ip->message);else return "The library iconv is not supported by your server";}
} else { if( $to == 'utf-8' ) {return $xml->ip->region;} else {if( function_exists( 'iconv' ) ) return iconv( "UTF-8", $to . "//IGNORE",$xml->ip->region);else return "The library iconv is not supported by your server";}}}
echo occurrence('','utf-8');