how do you get the ip address attached to my machine

Started by yuem on 29-May-2010/22:57:37-7:00
I have a windows xp machine. how can I get the IP address attached to my machine? what is the command to do that?
read join dns:// read dns://
That's for your local IP. You can get your WAN IP using: parse read http://guitarz.org/whatismyip.cgi [thru "< ip >" copy p to "< /ip >" ] ; (remove the spaces in the "ip" tags). to-tuple trim p
thanks nick.
Here is another one, it is just returns your IP adress, no html output. ip: to-tuple read http://www.whatismyip.com/automation/n09230945.asp
thanks Endo
The link above is a REBOL CGI script (that particular one is by Graham), so can be configured to return in any format desired :)
Try this one: to-tuple read http://guitarz.org/ip2.cgi
And the one at http://guitarz.org/ip3.cgi is even simpler. Here's the source: #!/home/path/rebol -cs R E B O L [] print "Content-type: text/html^/" prin system/options/cgi/remote-addr quit

Reply