There is a module called "geohostip" or something (just search for GEO or IP in the forge). However, the module is already years days old - though it still worked last time I tried. I use a very similar approach for country detection on some sites. The service (I think
www.HostIp.info) works great for countries, they do offer regional segmentation as well, you might want to give it a try with some additional smarty logic like (this no real logic

):
Code: Select all
IF IPLOOKUP-RESULT->TOWN == 'MyTwn' then
content a
else
content b
The Module/Plug-in itself does output the towns name I think. I can't think of a better (well, quicker) solution for now. There might be other GEO-IP-Lookup services, but in that case, you need to code something yourself.
To show the actual content, there are several options. You could write a little UDT that redirects depending on the result.
Best
Nils