Get IP Address Using PHP

There’s a lot of approach to get ip address in php.  But here’s how I code when I need to get clients Ip address.

Here’s an alternate approach as well,  but I am not sure about this as HTTP_X_FORWARDED_FOR can be anything a client chooses to set, whereas REMOTE_ADDR is considerably harder to fake.

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *