I want to assign client IP which i got from my ISP to my localhost and not default IP: 127.0.0.1. I have apache server installed in my personal computer and want these settings locally.
Does your ISP allow you to host web sites from your connection?
I just want to run a test program from my localhost. I always get 127.0.0.1 when i try by $SERVER['HTTPCLIENT_IP'] or $SERVER['REMOTEADDR'] or $SERVER['HTTPX_FORWARDED_FOR'] locally.
Forget HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR. Those are not to be used under any circumstance.
REMOTE_ADDR also give me same localhost IP 127.0.0.1 how can i get my client / network IP which i get by whatismyip.com?
You have to travel from the outside in. Or just use your Private IP (normally 192.168.1.xxx) from your your own network. But the end result will still be the same. REMOTE_ADDR contains the IP of the connecting client. But HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR DO NOT, they can contain bad things.