Dev/uncategorized
[PHP] Get client IP address
공대나왔음
2018. 3. 7. 15:56
$ip = $_SERVER['REMOTE_ADDR'] ? : ($_SERVER['HTTP_X_FORWARDED_FOR'] ? : $_SERVER['HTTP_CLIENT_IP']);
References
- http://itman.in/en/how-to-get-client-ip-address-in-php/
- https://stackoverflow.com/questions/3003145/how-to-get-the-client-ip-address-in-php
- https://www.virendrachandak.com/techtalk/getting-real-client-ip-address-in-php-2/