Created
October 23, 2018 14:49
-
-
Save chrisvasey/58987e28c59b2d5e9fc49f28bc415fee to your computer and use it in GitHub Desktop.
Getting client IP in PHP as seen here https://stackoverflow.com/questions/6794782/definitive-way-to-get-user-ip-address-php
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 | |
$IP = $_SERVER['REMOTE_ADDR']?:($_SERVER['HTTP_X_FORWARDED_FOR']?:$_SERVER['HTTP_CLIENT_IP']); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment