|
This is really quite simple actually. You use GeoIP from maxmind to get the country based on the ip, the db is on your server and GeoIP is pretty fast. From there you use ImageMagick (or GD) to create a banner with the text and country you want. If the banner doesnt exist you create it and wirte it out to something like US.jpg. If it does exist, serve the already existing banner. Once the banners are all made server load is extremely low and should not be a problem even on a high traffic site.
Andy
|