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
“When it absolutely, positively has to be there, try looking in your Spam folder.” - Adrian McElligott - July 2009
--
Have you tried the Local Search facility on the IP Locator Page yet?
User avatar
Adrian
Moderator
 
Posts: 970
Joined: Thu Nov 20, 2003 9:58 am

free access permanently blocked?

Postby vinny67 » Mon Mar 29, 2010 5:33 am

Hi,

My web page currently would be lucky to generate 10 lookups per DAY... but there was a backlog, so I exceeded your 20 lookups/hour limit a few times while processing it. Now I can't even make one lookup, days later. Is this by design, or is something wrong?

FYI: my application just tells me where people are downloading some software I've written and am offering for free under the GPL. I'm a grad student.

V
vinny67
 
Posts: 1
Joined: Mon Mar 29, 2010 5:24 am

Re: Simple Authentication for Programmatic Access to IP Locator

Postby Adrian » Wed Mar 31, 2010 4:17 pm

Hi V,
vinny67 wrote:My web page currently would be lucky to generate 10 lookups per DAY... but there was a backlog, so I exceeded your 20 lookups/hour limit a few times while processing it. Now I can't even make one lookup, days later. Is this by design, or is something wrong?
The limit should have been reset after an hour. If you are still blocked then please private message me and I will arrange access.
Adrian
“When it absolutely, positively has to be there, try looking in your Spam folder.” - Adrian McElligott - July 2009
--
Have you tried the Local Search facility on the IP Locator Page yet?
User avatar
Adrian
Moderator
 
Posts: 970
Joined: Thu Nov 20, 2003 9:58 am

Re: Simple Authentication for Programmatic Access to IP Loca

Postby IngloriousBaztard » Thu Jan 13, 2011 12:11 am

When you say "access credentials", clarify exactly what these r referring to?
IngloriousBaztard
 
Posts: 2
Joined: Wed Jan 12, 2011 9:15 pm

Re: Simple Authentication for Programmatic Access to IP Loca

Postby Adrian » Fri Jan 14, 2011 3:29 am

IngloriousBaztard wrote:When you say "access credentials", clarify exactly what these r referring to?
Your email address and password. When you establish an account with us - say for example by purchasing some Mapbytes, then our system will send you a password. This combined with the email address that you used when making your purchase is your "access credentials".

In any case, please let me know if I can assist further.
Adrian
“When it absolutely, positively has to be there, try looking in your Spam folder.” - Adrian McElligott - July 2009
--
Have you tried the Local Search facility on the IP Locator Page yet?
User avatar
Adrian
Moderator
 
Posts: 970
Joined: Thu Nov 20, 2003 9:58 am

Re: Simple Authentication for Programmatic Access to IP Loca

Postby neokio » Wed Mar 23, 2011 4:34 am

Here's an excellent PHP function for detecting a visitors IP address:

Code: Select all
   function getIP() {
      foreach (array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR') as $key) {
         if (array_key_exists($key, $_SERVER) === true) {
            foreach (explode(',', $_SERVER[$key]) as $ip) {
               if (filter_var($ip, FILTER_VALIDATE_IP) !== false) {
                  return $ip;
               }
            }
         }
      }
   }
   
   $tags = get_meta_tags( 'http://www.geobytes.com/IpLocator.htm?GetLocation&template=phpAll.txt&IpAddress='. getIP() );
   echo '<b>'. getIP() .'</b> resolves to:<br /><pre>'. print_r($tags,true) .'</pre>';
neokio
 
Posts: 1
Joined: Wed Mar 23, 2011 4:21 am

Re: Simple Authentication for Programmatic Access to IP Loca

Postby Adrian » Wed Mar 23, 2011 5:48 pm

Thanks neokio - I appreciate it - great example.
Adrian
“When it absolutely, positively has to be there, try looking in your Spam folder.” - Adrian McElligott - July 2009
--
Have you tried the Local Search facility on the IP Locator Page yet?
User avatar
Adrian
Moderator
 
Posts: 970
Joined: Thu Nov 20, 2003 9:58 am

Re: Simple Authentication for Programmatic Access to IP Loca

Postby ares82 » Mon Apr 25, 2011 11:57 pm

Hello everybody.
Do you know a method to do this in JSP?

Thank you.
Claudio
ares82
 
Posts: 1
Joined: Mon Apr 25, 2011 11:51 pm

Re: Simple Authentication for Programmatic Access to IP Loca

Postby jimih » Thu Oct 13, 2011 12:29 pm

I really think you should mention that the password must be the last parameter in the URL. We found this out the hard way, by noticing that it stilled tried to use the free service even though we had added the email and password to the URL (but with the IpAddress at the end). Or maybe this is an unknown bug?

Regards
/Jimi
jimih
 
Posts: 4
Joined: Tue Jul 12, 2011 3:05 pm

Re: Simple Authentication for Programmatic Access to IP Loca

Postby ritesh » Tue Nov 15, 2011 12:38 pm

Hi
If i purchase 10000 mapbytes and i use your API, than how i'll keep track records of remaining mapbytes in my account.
Please clarify.
ritesh
 
Posts: 1
Joined: Tue Nov 15, 2011 12:30 pm

Re: Simple Authentication for Programmatic Access to IP Loca

Postby willjthomas » Sun Nov 27, 2011 9:32 pm

This forum has some great info, I am new here by the way but thanks for all the help and great discussions.
willjthomas
 
Posts: 3
Joined: Sun Nov 27, 2011 9:09 pm
Location: Iceland

Re: Simple Authentication for Programmatic Access to IP Loca

Postby mudassir » Tue Jan 17, 2012 7:51 pm

Hi Adrian, your services seem quite interesting. I would like to try your IP Locator service for my website.
As, I've read, your data can be accessed pragmatically using PHP for 10 times / hour without any cost.
It returns the result in the form of an array, correct?

Well, I'm using GeoIP country to trace my visitors and planning to try your service to cross check the
results. I don't think that there can be more than 10 requests per hour from my website. But still I want
to know what will be returned back if I exceed the limit, an ERROR, a message or nothing?

You can send me an email with details, if you wish.
mudassir
 
Posts: 1
Joined: Tue Jan 17, 2012 7:40 pm

Re: Simple Authentication for Programmatic Access to IP Loca

Postby balexandre » Mon Aug 06, 2012 12:15 pm

Is there a way to get a JSON string?

maybe we could add
Code: Select all
getJSON=1
to the URL and get something like:

Code: Select all
{
"known":"true",
"locationcode":"DKSKCOPE",
"fips104":"DA",
"iso2":"DK",
"iso3":"DNK",
"ison":"208",
"internet":"DK",
"countryid":"65",
"country":"Denmark",
"regionid":"1493",
"region":"Kobenhavn",
"regioncode":"SK",
"adm1code":"DA06",
"cityid":"17241",
"city":"Copenhagen ",
"latitude":"55.6670",
"longitude":"12.5830",
"timezone":"+01:00",
"certainty":"90",
"mapbytesremaining":"Free"
}


It would help a lot the integration with a vast range of systems.

Thanks.
balexandre
 
Posts: 1
Joined: Mon Aug 06, 2012 12:10 pm

Geo Ip Location Service Payment formalities

Postby nilesh.ldce2007 » Thu Nov 28, 2013 11:13 am

Hi
I want to know the location information based on IP address. I am planning to use Geo Ip Location service.
As Geo Ip Location service (IP Address Map lookup service) is provided for FREE by Geobytes, inc to assist you in locating the geographical location of an IP Address.
It is totaly free service or it is something like I will get first 20 lookups per hour for free.
If it is not completely free than please let me know the payment formalities.
Thanks,
Nilesh
nilesh.ldce2007
 
Posts: 1
Joined: Thu Nov 28, 2013 10:32 am

Re: Simple Authentication for Programmatic Access to IP Loca

Postby Katevdarrs » Thu Apr 24, 2014 2:46 pm

Hello,

I'm also interested in getting the geo location using the IP address. Is there a free service ? Where can I find info about it ?

Thanks
Kate
Katevdarrs
 
Posts: 1
Joined: Thu Apr 24, 2014 2:43 pm


Return to IP Locator

Who is online

Users browsing this forum: No registered users and 0 guests

cron