I want to fetch the local ip and proxy server address by php code.

$ipAddress = $_SERVER;
$localIpAddress = $HTTP_SERVER_VARS;

thats becase when you type http://localhost (or whatever the local machine is called) from the machine itself then you will get directed to

Put your server online (left click on wamp icon, then put online) and then goto your IP (you said in your browser.

omick16. PHP Server runs off of a web server, aka apache. If your accessing it locally, it can be accessed by 'localhost'. As far as i know, there isn't a function available to tell you the IP address of the machine your running.