Page 1 of 2

Find my IP Address?

Posted: Thu May 02, 2013 3:08 am
by Newbie4
Is there a way to find my IP address?

The dictionary has some commands but they require an open socket. I just want to find out what my computer's IP address is without starting a server up and connecting to it

Re: Find my IP Address?

Posted: Thu May 02, 2013 3:26 am
by CoffeeCone
Newbie4 wrote:Is there a way to find my IP address?

The dictionary has some commands but they require an open socket. I just want to find out what my computer's IP address is without starting a server up and connecting to it
You use the hostName along with the hostNameToAddress functioon.

Code: Select all

on mouseUp
   answer the hostNameToAddress of the hostName
end mouseUp

Re: Find my IP Address?

Posted: Thu May 02, 2013 3:51 am
by Newbie4
Thank you. I would never have figured that out on my own in a million years.

Re: Find my IP Address?

Posted: Thu May 02, 2013 4:01 am
by CoffeeCone
Newbie4 wrote:Thank you. I would never have figured that out on my own in a million years.
The Dictionary does leave a lot to be desired.

Re: Find my IP Address?

Posted: Thu May 02, 2013 5:52 pm
by Mark
Hi,

The hostname is nice, but if you want to find the global IP address, the easiest way is to use a web service:

Code: Select all

put URL "http://qery.us/iptest.php"
Best,

Mark

Re: Find my IP Address?

Posted: Fri May 10, 2013 8:25 am
by andrewferguson
Mark wrote:Hi,

The hostname is nice, but if you want to find the global IP address, the easiest way is to use a web service:

Code: Select all

put URL "http://qery.us/iptest.php"
Best,

Mark
That doesn't seem to work for me. I just get http://qery.us/iptest.php as if its a normal put and not put URL.

Andrew

Re: Find my IP Address?

Posted: Fri May 10, 2013 9:02 am
by Simon
Works for me.

Simon

Re: Find my IP Address?

Posted: Fri May 10, 2013 9:05 am
by Simon
Works for me.

Simon

Re: Find my IP Address?

Posted: Fri May 24, 2013 6:55 pm
by andrewferguson
Downloaded LiveCode open source, and now it works!

Re: Find my IP Address?

Posted: Fri May 24, 2013 7:05 pm
by Mark
Hi,

Just to be clear, qery.us works with any version of LiveCode, open-source or not.

Kind regards,

Mark

Re: Find my IP Address?

Posted: Fri May 24, 2013 7:09 pm
by andrewferguson
Oh,
I'll check on Wednesday when I get back to the Commercial LiveCode.
Andrew

Re: Find my IP Address?

Posted: Thu Sep 07, 2017 4:45 pm
by trevix
put URL "http://qery.us/iptest.php"

Does not work anymore. You get a bunch of stuff...

Trevix

Re: Find my IP Address?

Posted: Thu Sep 07, 2017 5:22 pm
by bogs
trevix wrote:Does not work anymore. You get a bunch of stuff...
To better define "a bunch of stuff..." heh, you basically get the page source.
Image

Re: Find my IP Address?

Posted: Thu Sep 07, 2017 5:26 pm
by trevix
This works:

put URL "https://ip.seeip.org" into MyPubblicIP

I wonder for how long...

Re: Find my IP Address?

Posted: Thu Sep 07, 2017 5:56 pm
by FourthWorld
I realize the OP was looking for an answer that wasn't dependent on a server, but since the nature of the task almost requires an external server and relying on other people's servers may be dodgy, if you have a server with LC Server installed you can use this:

Code: Select all

<?lc put put $_SERVER["REMOTE_ADDR"] ?>
The bigger question here is: why is the address needed?