PHP: Getting outside IP address

new topic     » topic index » view thread      » older message » newer message

Occasionally people have asked how to get an their externally accessable 
ip# when they are behind a router, or when they have a dynamic ip#. This 
has been working well for me for a while now, and i run it on several http 
hosts with no problems. It's php, not Eu.

<?
echo getenv("REMOTE_ADDR");
?>

Use your favorite method to http to this file.php on your remote shell, it 
returns your ip# that everyone sees you as, you use it. Simple.


Kat

<[ This message has been forwarded by Vincent on behalf of Kat. ]>

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu