Intelligent Design
  • Home
  • About
    • Frequently Asked Questions
    • Why the Name, Intelligent Design?
    • Our Blog
    • The Making of a Website
    • The Anatomy of a Website
  • Services
  • Prices
    • Web Design Quote
  • Portfolio
    • Print Design
    • Logo Design
    • Website Design
  • Contact

Blog

Home / Custom web components / The IP Address Geo-location API We Use

The IP Address Geo-location API We Use

Jul 24, 2012GeorgeCustom web components, ProgrammingComments Off on The IP Address Geo-location API We Use

I had found an excellent IP address Geo-location API a few months ago to enhance a simple chat application I made for a church’s website.  The nice things about this API are that it is automatically updated and kept current, the response time is very fast, the output is very easy to use XML, and it is free to use for 3 days.

I was using it when it was completely free up to a certain number of queries, but that offer has been discontinued, however the support team is gracious enough to allow me to be “grandfathered in” with free limited access.

Usage with a PHP application is very simple:

$ip = $_SERVER['REMOTE_ADDR'];
$key = 'yourKeyString';
$xml = simplexml_load_file("http://www.ipgp.net/api/xml/$ip/$key");
echo "The IP of $ip is from the country of $xml->Country, the region of $xml->Region, the city of $xml->City, and their ISP is $xml->Isp.";

The API has other features as well such as a link to the country’s flag as an XML node.

Tags: PHP,  web application,  XML

Written by George

Related Posts
← Home Assist Senior Care Website Created
Advantages of Google AdWords →
© Copyright 2013 - All Rights Reserved
  • Twitter
  • Facebook
  • Dribbble
  • LinkedIn