Simple Authentication for Programmatic Access to IP Locator

This IP Address Map lookup service is provided for FREE by Geobytes, inc to assist you in locating the geographical location of an IP Address.

Moderators: Moderators, GeobytesAdmins

Simple Authentication for Programmatic Access to IP Locator

Postby Adrian » Wed May 14, 2008 8:29 pm

Note: This method obsoletes the previous token passing method. (Although the previous method is still supported for backwards compatibility.)

Note: If your application will never exceed the free 20 look-ups per hour, then you do not necessarily need to Authenticate, in which case you do not need to pass any authentication parameters with your request. However, there is no disadvantage in passing your access credentials with each request as you will still receive the free 20 look-ups per hour and in the event that your application does exceed the 20 look ups per hour limit, then the request will still be serviced.

*** Mapbytes ***

Mapbytes can be used to send paid requests to the IP Locator at http://www.geobytes.com/IpLocator.htm.

Authentication is very easy - all you do is append &pt_email=someone@example.com&pt_password=xxxxx to the request - substituting in your access credentials. To safeguard your access credentials we recommend (although it is optional) that you use our secure server at secure.geobytes.com. A sample secure request may look like this:

Code: Select all
https://secure.geobytes.com/IpLocator.htm?GetLocation&template=php3.txt
&IpAddress=x.x.x.x&pt_email=someone@example.com&pt_password=xxxxxxxxxx


and for your reference a non secure request may look like this:

Code: Select all
http://www.geobytes.com/IpLocator.htm?GetLocation&template=php3.txt
&IpAddress=x.x.x.x&pt_email=someone@example.com&pt_password=xxxxxxxxxx


So to do this in PHP for example, you could use the following two lines - the first to send the request and read back the geolocation information in to a PHP array, and then the second line to display the user's city in the browser.

Code: Select all
$tags = get_meta_tags('http://www.geobytes.com/IpLocator.htm?GetLocation&template=php3.txt&IpAddress=x.x.x.x');
print $tags['city'];  // city name


*** How to obtain Mapbytes ***
Mapbytes can be purchased directly from our buy page at https://secure.geobytes.com/buy.htm#mapbytes for $1 per 1,000 mapbytes (It costs 1 mapbyte per resolution).

*** Mapbytes Charge ***
The MapBytes system is ideal for low volume access as the first 20 resolutions per hour are free, with each resolution after that being charged at 1 Mapbyte per resolution.

*** Templates ***
We have many different templates available. Please see this post for a list of them:
viewtopic.php?t=593

*** What are Mapbytes ***
They are a micro-payment system. You can find out more here:
http://www.geobytes.com/FAQ.htm#Mapbytes
viewtopic.php?p=1389

*** Getting help with the coding ***
If you required someone to help you with the coding, then you may wish to consider using a coder from Rent-A-Coder (most projects come in at less then $100) If you do elect to go this way, and if you choose to publish the code here as an example, then Geobytes will credit you the equivalent value in Mapbytes - up to $500, to whatever the coder charges . So if it costs you $20 to have the script developed by a RAC coder, then I will give you $20 worth of Mapbytes - provided that you post the script here so that others can benefit from it also. If you use our RAC affiliate link http://www.rentacoder.com/RentACoder/de ... Id_1839123 then their system will notify us of your project, but if not, then please just drop me a post here to let me know.

Two coders that I have personally worked with before are "JoeTheCoder" and "Neo - No extra ordinary". I only mention them as they have done this kind of thing before, and are both very affordable, so you may wish to invite them to bid on your project.

If you elect to go this way, then please let me know if you need any assistance in specifying the project, and of course please let us know when the project is completed so that we can credit you with the equivalent value in Mapbytes.

Please let me know if I can provide further information or assistance.
Adrian
“The trouble with the world is that the stupid are cocksure and the intelligent are full of doubt.” - Bertrand Russell
--
Have you tried the Local Search facility on the IP Locator Page yet?
User avatar
Adrian
Moderator
 
Posts: 840
Joined: Thu Nov 20, 2003 9:58 am

Return to IP Locator

Who is online

Users browsing this forum: No registered users and 0 guests