IP2Geo
Web Personalization for One-to-One Web Marketing
The IP2Geo® Web Service resolves IP addresses to Network Owner Name, City, State/Province, and Country. In most U.S. cities, it will also provide extra information such as Area Code and Latitude/Longitude. This service allows for the integration of location & distance information and other geographic intelligence into your application databases, business processes and web sites.
IP2Geo gives you easy access to numerous data points that you can use to impress your clients. From geographically customized menus to log file analysis, your targeted site visitors will be impressed when they see specific information on their location. The real-time technology can even be used to trigger special "preferred location" promotions.
This service is also used to validate users by IP address to weed out hackers and other fraudsters.
All of CDYNE's Web services are built on XML standards and are delivered via a secure Internet connection. This real-time Web service dynamically delivers value-added information at the point of customer interaction or to the client database for true enterprise intelligence, positively affecting the quality of resultant analytics, customer relationships and the bottom line.
Contents |
General Information
IP2Geo - IP Address to Geographic information.
Developer/Tester Information
- WSDL
- Testing URL
- IP2Geo SPEC SHEET - XML Web Service Specifications
PHP Example
class IP2Geo { private $ip; private $license; public $response; public function __construct($ip,$license) { $this->license = $license; $this->ip = $ip; $response = $this->getResponse(); } public function getResponse() { $url = "http://ws.cdyne.com/ip2geo/ip2geo.asmx/ResolveIP"; $url .= "?ipAddress=" . $this->ip . "&licenseKey=" . $this->license; $this->response = simplexml_load_file($url) or die("ERROR"); } } function getRealIP() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) { $ip=$_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ip=$_SERVER['HTTP_X_FORWARDED_FOR']; } else { $ip=$_SERVER['REMOTE_ADDR']; } return $ip; } $ip = getRealIP(); $key = 'XXXXXXXXXXXXXXXXXXXX; $data = new IP2Geo($ip,$key); var_dump($data);
