i am running a socket program for which i need the ip of the system where the server is located(my own system).
The problem is how do i get the ip of my system using php?
how do i get the ip of my own system?
Moderator: General Moderators
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: how do i get the ip of my own system?
Code: Select all
$_SERVER['REMOTE_ADDR']Re: how do i get the ip of my own system?
If I'm not mistaken, that gets the IP of the client.
Re: how do i get the ip of my own system?
You are not mistaken.
Code: Select all
$_SERVER['SERVER_ADDR'];
Re: how do i get the ip of my own system?
your server IP is 127.0.0.1
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: how do i get the ip of my own system?
oops misread your post 