Created
October 19, 2015 01:47
-
-
Save akmandev/8f2ee87090baca8f0a9f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$userIP = $_SERVER['REMOTE_ADDR']; | |
//$userIP = '78.179.207.153'; | |
$ipToGeo = file_get_contents('http://www.telize.com/geoip/'. $userIP); | |
$ipToGeo = json_decode($ipToGeo); | |
$userCountry = $ipToGeo->country; | |
?> | |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Kullanıcı Bilgileri</title> | |
</head> | |
<body> | |
<h3>Kullanıcı IPsi</h3> | |
<?php echo $userIP?> | |
<br><br> | |
<h3>Ülke</h3> | |
<?php echo $userCountry?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment