Skip to content

What is my IP address?

For a number of reasons it is nice to know your own IP-address. If you are behind a firewall or a NAT system, you usually only have a private IP-address and "someone else" on the internet needs to tell you your official IP-address.

Given what usually happens with free services - they are closed once in a while - and with freemium services - they change the business modell - I decided to run my own service. After all, it's not that complicated, and it integrates well into my own Dynamic DNS service.

What do you need to run such a service?

  • A webserver with the ability to run scripts
  • A small script
  • Optional: a domain or subdomain

Since I already use "updates.domain" for my own Dynamic DNS service, I decided to use this subdomain for the "what is my IP address" service as well. As scripting language I use PHP here.

Decide yourself if you want to integrate this into the "index.php" or use another name. The script itself is ridiculous easy:

<?php

print $_SERVER['REMOTE_ADDR'];

?>

Whenever you enter the URL into a browser, it returns your current official IP-address - and nothing else. No advertising, no Captcha, just the address. Usage in a script is very easy as well:

lynx -source -dump http://updates.domain/my_ip.php

 

  • Twitter
  • Bookmark What is my IP address? at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg What is my IP address?
  • Bloglines What is my IP address?
  • Technorati What is my IP address?
  • Fark this: What is my IP address?
  • Bookmark What is my IP address? at YahooMyWeb
  • Bookmark What is my IP address? at Furl.net
  • Bookmark What is my IP address? at reddit.com
  • Bookmark What is my IP address? at blinklist.com
  • Bookmark What is my IP address? at Spurl.net
  • Bookmark What is my IP address? at Simpy.com
  • Bookmark What is my IP address? at blogmarks
  • Bookmark What is my IP address? with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

LeSpocky on :

Falls man lynx nicht installiert hat, tut auch: curl http://www.example.com/my_ip.php ;-)
Comments ()

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
To leave a comment you must approve it via e-mail, which will be sent to your address after submission.
Form options