[Richard Suchenwirth] 2007-06-27 - http://www.fallingrain.com/world/ provides a very large, publicly accessible gazetteer of the world's cities and airports - they must have millions of entries available in [HTML] format. To avoid that pages get too big, they use a partly very deep URL tree. For instance, to locate my city Konstanz, the URL is http://www.fallingrain.com/world/a/K/o/n/s/t/a/n/z/ In other cases, short prefixes are sufficient, e.g. all 131 airports whose code starts with ED (plus some others) are delivered by the URL http://www.fallingrain.com/world/a/E/D/ So to search for a place one has to iterate the URL, appending letter after letter until a match is found. Here's a proc that does this - called with a place name, it returns a list of hits, where each hit is a list of name type region country lat lon evel(ft) pop(est) #!/usr/bin/env tclsh package require http proc geo'get'rain placename { set url http://www.fallingrain.com/world/a/ set res {} foreach c [split $placename ""] { set i [scan $c %c] if {$i < 65 || $i > 127} {set c $i} append url $c/ set token [http::geturl $url] set page [http::data $token] http::cleanup $token foreach line [split $page \n] { if [string match