logo       

How you could get your public IP from Squeak: msg#00103

lang.smalltalk.squeak.beginners

Subject: How you could get your public IP from Squeak

My router is NOGA KN-S1060

| stream wanIp |
stream := HTTPSocket
httpGet: 'http://192.168.1.1/sys_status.htm'
args: nil
user: 'admin'
passwd: 'admin'.
stream upToAll: 'wanIP'.
wanIp := stream upTo: $;.
^ wanIp := (wanIp findTokens: '"') at: 2

And I have a Mac , a Windows PC and a Linux box on my small LAN

Perhaps this could be useful to some

Edgar


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise