Step by step instructions:
1. Navigate to START - > RUN
2. Launch the command window by typing:
cmd
3. Type:
ipconfig /all
4. The IP address for the machine will show in the “Connection” section next to: IP Address.
Writing about PHP scripting since 12/99. Learn something new every day.
PHP Diary // Home
Tuesday, November 1st, 2005
Step by step instructions:
1. Navigate to START - > RUN
2. Launch the command window by typing:
cmd
3. Type:
ipconfig /all
4. The IP address for the machine will show in the “Connection” section next to: IP Address.
But from within PHP how can I determine what my local IP address is. $REMOTE_ADDR gives us the IP address of the machine, but if I have 3 network adapters (LAN, Wireless and a VPN connection) how do I know what my local IP address is that received the request?
Consider the case where you are running a local PHP script (this is not part of a website) and you need to know your address.
on January 23rd, 2006 at 7:59 pm | #Link Comment$_server[’SERVER_ADDR’] Gives the local IP address.
on March 27th, 2006 at 6:36 am | #Link CommentTry with it.
Thanks! This is just what I needed to complete a Script! I didn’t remember what Server Variable held the server IP.
Iván
on July 22nd, 2007 at 8:44 pm | #Link Comment