PHP
  Home arrow PHP arrow Building Sample Programs for an IP-to-country Mapping Application
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
PHP

Building Sample Programs for an IP-to-country Mapping Application
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 3
    2009-02-10


    Table of Contents:
  • Building Sample Programs for an IP-to-country Mapping Application
  • Review: building an IP-to-country mapping MySQL table with a lookup database file
  • Mapping IP addresses to originating countries with a basic geo location application
  • Developing an object-oriented geo-location PHP application

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Building Sample Programs for an IP-to-country Mapping Application
    ( Page 1 of 4 )

    Undeniably, the ability to determine from which countries visitors are accessing a particular web site can be useful, and not only for statistical purposes. With this information at your disposal, it’s possible to instruct the site to deliver its content in different languages, a feature that users worldwide will appreciate. This second part of a four-part series moves you in that direction with some sample programs.

    Introduction

    Building a web site that will be seated on a multi-lingual platform often requires developing an IP-to-country application that permits you to map users' IP addresses to their corresponding countries. Thus, if you're interested in learning how to create an application like this, which can be easily incorporated into any existing web site, then this series of articles might be what you're looking for.

    Of course, if you already read the initial chapter of this series, then you're already familiar with creating the basic structure of the aforementioned IP-mapping program. In that tutorial I explained how to create a lookup MySQL table by importing the contents of the IP-to-country database, available for free at Webnet77.

    This database contains over 82,0000 records and allows you to map more than 3,200,000 IP addresses to their respective countries. This can be really handy for developing different IP-to-country applications with minor efforts.

    Since I already discussed how to create a mapping MySQL table by using the lookup database, in this second article I'm going to appeal to the functionality of this table to build a couple of sample PHP applications. These applications will be capable of determining from which country visitors are accessing a web page, in accordance with their IP addresses.

    Now, it's time to get rid of the preliminaries and start developing these simple -- yet efficient -- IP-to-country programs with PHP. Let's jump in!



     
     
    >>> More PHP Articles          >>> More By Alejandro Gervasio
     

       

    PHP ARTICLES

    - Adding Ordering and Grouping Clauses to the ...
    - Implementing Factory Methods in PHP 5
    - Merging a File Split for FTP Upload using PHP
    - Getting Data from Yahoo Site Explorer Inboun...
    - Method Chaining: Adding More Selecting Metho...
    - How to Split a File During an FTP Upload Usi...
    - Expanding a Custom CodeIgniter Library with ...
    - Using the Yahoo Site Explorer Inbound Links ...
    - Building a CodeIgniter Custom Library with M...
    - Building an E-mini Trading System Using PHP ...
    - Completing the MySQL Class with Method Chain...
    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek