<?php
$ip = $_SERVER['REMOTE_ADDR'];
$a = file_get_contents("http://whatismyipaddress.com/ip/$ip");
$b = explode('<tr><th>Country:</th><td>',$a);
$c = explode('</td>',$b[1]);
$d = $c[0];
$i = explode("<img",$d);
$strana = $i[0];
if ($strana == "Bulgaria ")
{
echo "Vie ste ot Bulgaria.";
}
else
{
echo "Vie ne ste ot Bulgaria.";
}
?>