Created
January 23, 2018 22:25
-
-
Save angristan/9759e2b51e730a1bde0090be39d96184 to your computer and use it in GitHub Desktop.
Get the client IP address and reverse DNS
This file contains 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 | |
echo $_SERVER['REMOTE_ADDR']; | |
echo "<br>"; | |
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); | |
echo $hostname; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment