henson4004 — 2011-10-23T01:40:34-04:00 — #1
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.
logic_earth — 2011-10-23T03:38:47-04:00 — #2
Does your ISP allow you to host web sites from your connection?
henson4004 — 2011-10-23T03:42:07-04:00 — #3
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.
logic_earth — 2011-10-23T03:52:12-04:00 — #4
Forget HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR. Those are not to be used under any circumstance.
henson4004 — 2011-10-23T03:54:31-04:00 — #5
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?
logic_earth — 2011-10-23T09:27:17-04:00 — #6
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.