Page 1 of 1

[SOLVED] Whats my ip?

Posted: Sun Mar 14, 2004 4:16 pm
by NeoPuma
Hi there,
I once seem it on a script, but i lost it. But any way, whats the code to display the IP of the viewer? Also i wish to put it in a text box...

-Neo

Posted: Sun Mar 14, 2004 4:18 pm
by Illusionist

Code: Select all

echo $_SERVER['REMOTE_ADDR'];
to put it in a textbox:

Code: Select all

$ip = $_SERVER['REMOTE_ADDR'];
echo "<input type="text" name="ip" value="$ip">";

Posted: Sun Mar 14, 2004 4:38 pm
by NeoPuma
ty