Posts by nope500 • 21 points
1 post
-
2
votes1
answer299
viewsQ: Why is it not good to use this function and how do I identify the user’s IP then?
public function get_client_ip() { $ipaddress = ''; if (isset($_SERVER['HTTP_CLIENT_IP'])) $ipaddress = $_SERVER['HTTP_CLIENT_IP']; else if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) $ipaddress =…