With this code, it is easy to find out a location of the guest from his IP address. This can be used than in the web language engine to show correct language mutation of the web page.
An example of the webpage using this functionality is strongcv.com The page has currently 2 language mutations - American and British English. The webpage is creating document which is called Resume in the USA and CV in the Europe. Thanks to "Get country by IP" functionality, it is possible to set up correct language for the guest.