How can i find out the script for http://www.whatismyip.com and what is it?
Thanks, Michael
P.S.
PLEASE SEND E-MAIL TO RESPOND!
Hi,
Try this
<?php
$ip=getenv(REMOTE_ADDR); echo($ip);
?>
Cheers Tabish
Thanks but it echos the address 127.0.0.1 when i test it pn my local network.
Any other ideas?
no. that is the only way of doing it. It will show the ip address of the person who visits the page.
Because on your local network, your IP is 127.0.0.1. Upload the script to a host and run it over the web - then you'll see your IP on the internet
Don't do that, you'll get an undefined constant error. (Depending on your error reporting level).
Always quote your strings! Use $ip = getenv('REMOTE_ADDR');