Why No Built in GetMyIP call in LiveCode?

Bob Sneidar bobs at twft.com
Fri Jun 10 16:10:44 EDT 2011


Unless, as was the case with me, it returns the FQDN from the AD DNS, and that happens to be wrong. I get lgos-mp-bobsneidar.cccm.lan. THAT is from our AD DNS, NOT the actual hostname of the computer as all computers will see it. What if there are computers that are not a part of that domain, and are not using that domain's address? If they try to ping me at that hostname they will get nothing. Therein lies the problem. 

Bob


On Jun 10, 2011, at 12:06 PM, Nonsanity wrote:

> In my last code, the localhost was just to get the hostName, something that
> can also be done with LC's built in hostName function/prop like so:
> 
> put char 2 to -2 of word 3 of shell( "ping -n 1" && the hostName ) into msg
> 
> It's just an optional way to get the hostName if LC was failing to do that
> properly for some reason. But pinging your hostName will be sure to return
> the IP address other computers on the LAN will see you as.
> 
> One-twenty-seven
> Zero dot zero dot one
> There's no place like home
> 
> ~ Chris Innanen
> ~ Nonsanity





More information about the use-livecode mailing list