Close

Generation of auth key

Your name:
Your e-mail:
Website's domain:

  Documentation 

Smart-IP API

More than 200 websites are using Smart-IP API — connect to us!

SmartIP API - the easiest way to extract the most complete information about any IP-address for your site.

We have developed API for JavaScript, through which web masters can add functionality to their sites to lookup and display information about the IP-addresses.

Access to the API is implemented through the connection of JavaScript libraries from our site. In order API functions became available and working correctly, you just need to register on our website and obtain an auth key for your domain. All is absolutely free.

Of course, we will be appreciated to everybody who will place the reference to our service on his Web site.

How does it use?

To install the library on your site just built-in into a page such a block of HTML-code:

<script type="text/javascript" src="http://smart-ip.net/_res/js/webservice/api.js?key=[auth_key]">
</script>

Where [auth_key] should be removed with an obtained auth key for your domain.

Then you can use on your page SmartIP object to obtain information and the withdrawal of visitor, its IP-address, his location (country, city, region) or even mention the situation on the Google maps!

In addition, SmartIP object can be used to obtain information of any IP addresses, which gives the opportunity to implement various services and applications at your site, such as search of WHOIS information by a given IP-address.

Below is a simple example of the withdrawal of information of IP-address, city and country of Web site visitor:

<html>
<head>
<!-- including API library -->
<script type="text/javascript" src="/_res/js/webservice/api.js?key=
[auth_key]">
</script>
</head>
<body>

<!-- the folowing element is used to withdaw an information -->
<div id="ipbox"></div>

<script type="text/javascript">
var myIp = new SmartIP();
myIp.onload = function() {
   document.getElementById( 'ipbox').innerHTML =
   'Hello, dear visitor! Your IP is ' +
   this.getIp() +
   '. How are you doing in ' +
   this.getCity() +
   ', ' +
   this.getCountryName() + '?';
};
myIp.load();
</script>
</body>
</html>

Show workable example... | Learn documentation... | Ask in forums... | Request feedback