If you use matrix1util's you can
perform checklist for interfaces
ID=1
ip$=ip to string$(checklist value a(ID))
// ID is the interface number. If you need to determine this you can execute
//
// perform checklist for interfaces
// for i=1 to checklist quantity()
// interfacename$(i)=checklist string(i)
// next i
//
// in order to list out the interface names
alternatively if you have the enhancement pack you can use get ip address$() otherwise you'll need to use a 3rd party program/plugin.
Buuuuuuut with matrix1, enhancement pack or most plugins you'll only get the interface IP address (i.e. 192.168.1.2) rather than external/internet IP address
to get the external IP you can the built in HTTP commands to return a string telling you your IP
IanM wrote this piece of code, i've converted it into a function for easier access
Function GetExternalIP()
Request$ = ""
` Connect to the site, and get a response (which will hopefully contain the IP address)
http connect "ipcheckit.com"
Result$ = http request data("GET", Request$, "")
` The result, if successful, will contain the IP address surrounded by html bold tags
` So first, search for the opening tag...
Start = instr(Result$, "<b>")
if Start > 0
` If the tag was found, then the IP address starts 3 characters further on.
inc Start, 3
` Search for the closing tag.
Finish = instr(Result$, "</b>", Start)
` Cut out the text between the tags
Result$ = mid$( Result$, Start, Finish - Start )
else
Result$="Unable to obtain IP address"
endif
http disconnect
endfunction Result$