This is based on the original GNS database so misses out on some of the corrections and other niceties of geonames.org but it might help you. (if you OK with creating your own geocoder based on it)
the same technique could be used with the geonames database, but its not trivial and is not particular accurate.
The problem is we don't have boundary information for the FIPS or ISO Codes for the UK http://en.wikipedia.org/wiki/ISO_3166-2:GB Hoever, I could update the geonames dataset with European NUTS regions. What do you think, should we go a different path for the UK?