Request: Personalize landing pages using GeoTargeting

Today I received a question from a customer if PHP could run on top of a Domino server. In the discussion that followed what the customer wants to achieve it became clear that he is more looking for a script to solve a problem rather than seeking for an integrated solution.

In short,  the customer wants to check the visitor’s IP address and popup a message in case a user from country A is looking at country B’s landing page and ask the visitor if he/she wants to be redirected to country A’s landing page.

A simple case of geotargeting which I did not smash in the face of the customer.

The question remains:

Does anyone have a Domino based solution for this?

A quick search via Google did not resulted in a JS script library containing the country-codes. Thanks in advance for your guidance!