3

Do you know pages that only return user's ip address?

You can use curl to view your address in a console or use it in a script

curl http://page

Does someone know more?


Got any idea how to tag it? Online tools or something?

8
  • 1
    This one is identical to what you already have - http://curlmyip.com/
    – VL-80
    Apr 30, 2014 at 23:59
  • It's not identical, it has another IP address. May 1, 2014 at 0:00
  • possible duplicate of Getting my IP address? May 1, 2014 at 0:32
  • "it has another IP address" That's... kinda... weird... (am I the only one thinking that?) If you're a normal home user you have only 1 (that is ONE) IP-address, and unless it's a dynamic one and changes very often, it should be the same, no matter which website you use to check it.
    – nidunc
    May 1, 2014 at 7:40
  • @nidunc, it is not clear what was meant by it has another IP address, so we do not know what is actual "meaning payload" of this statement.
    – VL-80
    May 1, 2014 at 14:25

2 Answers 2

2

When you connect to a website, your web browser hands the server a packet of information about you. This includes your public IP address. Servers such as your example simply repeat this back to the visitor.

Here's how to do it in PHP :

<?PHP
echo $_SERVER['REMOTE_ADDR'];
?>

From: https://stackoverflow.com/questions/13646690/how-to-get-real-ip-from-visitor

2
  • I asked for page urls, not how to make it. It still can be useful for using it on any free hosting May 1, 2014 at 0:01
  • Sorry.,, I read your question as "does someone know more about this". Didn't realize you were asking for additional examples. May 1, 2014 at 0:26
2

I usually use one of these two:

http://ifconfig.me

http://checkip.amazonaws.com

3
  • The first output more that just an IP adress. The second is fine. May 1, 2014 at 17:02
  • The first one returns just an IP when I curl it. I've never actually tried it in a browser before. If you scroll to the bottom of the page it shows links to get other info with curl as well.
    – ewatt
    May 2, 2014 at 5:29
  • "The first one returns just an IP when I curl it." - True, but probably some day you'll use a client that uses browser user agent string. It's slow too. ifconfig.me/ip works May 3, 2014 at 14:14

Not the answer you're looking for? Browse other questions tagged .