Client IP to my localhost

I want to assign client IP which i got from my ISP to my localhost and not default IP: 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 when i try by $_SERVER[‘HTTP_CLIENT_IP’] or $_SERVER[‘REMOTE_ADDR’] or $_SERVER[‘HTTP_X_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 how can i get my client / network IP which i get by

You have to travel from the outside in. Or just use your Private IP (normally 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.