Fokebox 463 Posted March 20, 2014 Report Share Posted March 20, 2014 Уважаемые гуру php, прошу помочь В общем вот код который по ip определяет доменную зону, но почему-то у меня не пашет ((( что не так? <?php if (isset($_SERVER['HTTP_CLIENT_IP'])) { $real_ip_adress = $_SERVER['HTTP_CLIENT_IP']; } if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $real_ip_adress = $_SERVER['HTTP_X_FORWARDED_FOR']; } else { $real_ip_adress = $_SERVER['REMOTE_ADDR']; } $cip = $real_ip_adress; $iptolocation = 'http://api.hostip.info/country.php?ip=' . $cip; $creatorlocation = file_get_contents($iptolocation); ?> Quote Link to post Share on other sites
ethoz 9 Posted March 20, 2014 Report Share Posted March 20, 2014 Если добавить echo $creatorlocation.' '.$cip; работает нормально. Fokebox 1 Quote Link to post Share on other sites
Fokebox 463 Posted March 20, 2014 Author Report Share Posted March 20, 2014 спасибо! можно закрывать ) Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.