Hello, Does anyone knows how to get my IP using PHP?? (The one that my provider gives me)
try $SERVER_ADDR
http://www.php.net/manual/en/language.variables.predefined.php
This will give me back my local address which is 127.0.0.1
Then you did not configure your webserver properly.
if its a personal server wouldnt it return the localhost ip 127.0.0.1? Either way, i've been reading thru these boards and vincent seems to know his stuff, so if it's not the above, you configured your server incorrectly =]
If it is a personal webserver then 127.0.0.1 would (or could) be it's IP number, and then 127.0.0.1 would be the correct answer. That is the ip number that the server can be reached at. There's not much point in reporting an IP number that the server cannot be reached at 🙂
I think the child wants his personal IP?
echo $REMOTE_ADDR;
will do it
--Nick