HomePHP Using Code Igniter to Build an IP-to-Country Mapping Application
Using Code Igniter to Build an IP-to-Country Mapping Application
Adding geo-location capabilities to a web site isnít too hard; itís possible to develop an IP-to-country mapping program with PHP, which can be incorporated into a site in a few easy steps. If youíre interested in learning how to build this application, then keep reading. This is the final installment of a four-part series that covers developing an IP-to-country mapping application with PHP.
As you would expect, this series walks you through building an IP-to-country lookup table with MySQL, and teaches you how to take advantage of its functionality for creating different IP mapping web-based programs.
Speaking of web-based programs, you may recall that in the previous part of the series, I explained how to use the IP-to-country lookup MySQL table for generating web pages in different languages.
Speaking more specifically, I created two sample applications with PHP. The first one was capable of constructing dynamically a hypothetical "products" web page section, based on the countries from which the page was being accessed, while the second example demonstrated how to build entire web documents.
So far, you shouldn't have major problems understanding how these two sample applications were developed, since the logic implemented by them was very simple to follow. However, I have to admit that these examples were pretty primitive and certainly can stand some improvement before being used in production environments.
With that idea in mind, in this final chapter of the series, I'll be discussing how to build multi-lingual web pages by combining the functionality brought by the "iptocountry" MySQL table that you learned in previous tutorials and the power of the Code Igniter PHP framework.
Now that you know what to expect from this article, it's time to move forward and learn how to use Code Igniter to generate dynamic web pages in different languages. Let's go!