LMSouq
php-dev Open

Get the client IP address using PHP

US
user1752627
1 month ago
3 views
Problem Description
I want to get the client IP address who uses my website. I am using the PHP `$_SERVER` superglobal: $_SERVER['REMOTE_ADDR']; But I see it can not give the correct IP address using this. I get my IP address and see it is different from my IP address and I can also see my IP address in some website like: http://whatismyipaddress.com/ I paste the IP address which give my PHP function but this website shows no result about this. How does this problem come about and how can I get IP address of the client?

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base