proc getExternalIP {} { set token [http::geturl http://myexternalip.com/raw] set externalIP [string trim [http::data $token]] ::http::cleanup $token return $externalIP }It depends on:
package require httpAnd it expects that http://myexternalip.com/raw returns your external IP-address.
As always: comments, tips and questions are appreciated.