Re: IP address and Country

2022-11-27 Thread harrison--- via use-livecode
Hi Kee,

I did solve it, I just forgot to tell the list that I did.  Oops.

Thanks!

Rick



> On Nov 27, 2022, at 4:17 PM, kee nethery via use-livecode 
>  wrote:
> 
> When we did this, the database table had a start and end IP address range 
> column.
> 
> The IP addresses were entered into the table as integers without the dots. 
> I’m not sure but I think we might have put a “1” at the beginning of the IP 
> address integers so that everything stayed 13 digits (ie the front zeros in 
> an IP address were not eliminated).
> 
> StartIP and EndIP columns were indexed.
> 
> The lookup time was pretty quick. 
> 
> Kee Nethery

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: IP address and Country

2022-11-27 Thread kee nethery via use-livecode
When we did this, the database table had a start and end IP address range 
column.

The IP addresses were entered into the table as integers without the dots. I’m 
not sure but I think we might have put a “1” at the beginning of the IP address 
integers so that everything stayed 13 digits (ie the front zeros in an IP 
address were not eliminated).

StartIP and EndIP columns were indexed.

The lookup time was pretty quick. 

Kee Nethery
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: IP address and Country

2022-11-15 Thread harrison--- via use-livecode
Hi Alex,

Sorry, it’s been a really busy day here.
I can’t get back to this problem until tomorrow.

Don’t drag out your C code just yet,
I have some ideas to try.

Thanks,

Rick

> On Nov 15, 2022, at 1:35 PM, Alex Tweedly via use-livecode 
>  wrote:
> 
> Hi Rick,
> 
> I had missed the fact that you said you already had the database - that makes 
> it a much easier problem :-)
> 
> While I don't have any Livecode code for this, I do have some C code for a 
> (probably) very similar problem.
> 
> If you can describe the format of your database, and the query you want to 
> make, I'll see if what I have is a good starting place, and then convert the 
> C code if practical.
> 
> Thanks,
> 
> Alex.
> 
> On 15/11/2022 17:12, harrison--- via use-livecode wrote:
>> Hi Martin,
>> 
>> Thanks for the information, but what I really want is a LiveCode solution
>> that doesn’t depend on third parties.
>> 
>> I have the database. I was asking if other people here
>> had come up with a fast LiveCode solution.
>> 
>> If all else fails, I will look into one of the third party suggestions,
>> but third parties can change their code or suddenly disappear
>> off of the internet.  I don’t want my website breaking all the time
>> due to such dependencies.
>> 
>> Thanks again,
>> 
>> Rick
>> 
>> 
>>> On Nov 14, 2022, at 11:22 PM, Martin Koob  wrote:
>>> 
>>> You can use a website with a api that you send a HTTP request with an IP 
>>> address parameter to and which returns the country info.
>>> 
>>> Here is an example I found of one site.
>>> 
>>> https://ipapi.co/api/#introduction 
>>> 
>>> HTTP Request
>>> 
>>> GET https://ipapi.co/{ip}/{format}/
>>> 
>>> URL Parameters
>>> 
>>> Parameter   Description
>>> ip  An IP address for which you want to retrieve the 
>>> location
>>> format  Data format of response, possible values are json, 
>>> jsonp, xml, csv, yaml
>>> 
>>> E.g.
>>> 
>>> https://ipapi.co/8.8.8.8/json/
>>> 
>>> It is free for up to 30K requests per month,  after that there is a fee.
>>> 
>>> https://ipapi.co/#pricing 
>>> 
>>> Martin Koob
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: IP address and Country

2022-11-15 Thread Alex Tweedly via use-livecode

Hi Rick,

I had missed the fact that you said you already had the database - that 
makes it a much easier problem :-)


While I don't have any Livecode code for this, I do have some C code for 
a (probably) very similar problem.


If you can describe the format of your database, and the query you want 
to make, I'll see if what I have is a good starting place, and then 
convert the C code if practical.


Thanks,

Alex.

On 15/11/2022 17:12, harrison--- via use-livecode wrote:

Hi Martin,

Thanks for the information, but what I really want is a LiveCode solution
that doesn’t depend on third parties.

I have the database. I was asking if other people here
had come up with a fast LiveCode solution.

If all else fails, I will look into one of the third party suggestions,
but third parties can change their code or suddenly disappear
off of the internet.  I don’t want my website breaking all the time
due to such dependencies.

Thanks again,

Rick



On Nov 14, 2022, at 11:22 PM, Martin Koob  wrote:

You can use a website with a api that you send a HTTP request with an IP 
address parameter to and which returns the country info.

Here is an example I found of one site.

https://ipapi.co/api/#introduction 

HTTP Request

GET https://ipapi.co/{ip}/{format}/

URL Parameters

Parameter   Description
ip  An IP address for which you want to retrieve the 
location
format  Data format of response, possible values are json, jsonp, xml, 
csv, yaml

E.g.

https://ipapi.co/8.8.8.8/json/

It is free for up to 30K requests per month,  after that there is a fee.

https://ipapi.co/#pricing 

Martin Koob

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: IP address and Country

2022-11-15 Thread harrison--- via use-livecode
Hi Martin,

Thanks for the information, but what I really want is a LiveCode solution
that doesn’t depend on third parties.

I have the database. I was asking if other people here
had come up with a fast LiveCode solution.

If all else fails, I will look into one of the third party suggestions,
but third parties can change their code or suddenly disappear
off of the internet.  I don’t want my website breaking all the time
due to such dependencies.

Thanks again,

Rick


> On Nov 14, 2022, at 11:22 PM, Martin Koob  wrote:
> 
> You can use a website with a api that you send a HTTP request with an IP 
> address parameter to and which returns the country info.
> 
> Here is an example I found of one site.
> 
> https://ipapi.co/api/#introduction 
> 
> HTTP Request
> 
> GET https://ipapi.co/{ip}/{format}/
> 
> URL Parameters
> 
> Parameter Description
> ipAn IP address for which you want to retrieve the 
> location
> formatData format of response, possible values are json, 
> jsonp, xml, csv, yaml
> 
> E.g.
> 
>   https://ipapi.co/8.8.8.8/json/
> 
> It is free for up to 30K requests per month,  after that there is a fee.
> 
> https://ipapi.co/#pricing 
> 
> Martin Koob

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: IP address and Country

2022-11-14 Thread Martin Koob via use-livecode
You can use a website with a api that you send a HTTP request with an IP 
address parameter to and which returns the country info.

Here is an example I found of one site.

https://ipapi.co/api/#introduction

HTTP Request

GET https://ipapi.co/{ip}/{format}/

URL Parameters

Parameter   Description
ip  An IP address for which you want to retrieve the 
location
format  Data format of response, possible values are json, jsonp, xml, 
csv, yaml

E.g.

https://ipapi.co/8.8.8.8/json/

It is free for up to 30K requests per month,  after that there is a fee.

https://ipapi.co/#pricing

Martin Koob
> On Nov 14, 2022, at 9:34 PM, harrison--- via use-livecode 
>  wrote:
> 
> Hi Bob,
> 
> Yes, that website illustrates what I’m trying to do, but
> I really need my own code for this.
> 
> Thanks for the suggestion anyway.
> 
> Rick
> 
>> On Nov 14, 2022, at 7:57 PM, Bob Sneidar via use-livecode 
>>  wrote:
>> 
>> Is that a fixed thing? Can it ever change? Seems like there must be a web 
>> site for that. I found https://www.ipvoid.com/ip-to-country/ 
>> . They may license the tool that does 
>> this.
>> 
>> Bob S
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: IP address and Country

2022-11-14 Thread harrison--- via use-livecode
Hi Bob,

Yes, that website illustrates what I’m trying to do, but
I really need my own code for this.

Thanks for the suggestion anyway.

Rick

> On Nov 14, 2022, at 7:57 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> Is that a fixed thing? Can it ever change? Seems like there must be a web 
> site for that. I found https://www.ipvoid.com/ip-to-country/ 
> . They may license the tool that does 
> this.
> 
> Bob S

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: IP address and Country

2022-11-14 Thread Bob Sneidar via use-livecode
Is that a fixed thing? Can it ever change? Seems like there must be a web site 
for that. I found https://www.ipvoid.com/ip-to-country/. They may license the 
tool that does this.

Bob S


On Nov 14, 2022, at 16:50 , harrison--- via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

Greetings LiveCoders,

I’m trying to set up an LC Server routine
to retrieve the country name where the user
is supposedly located by using the user’s
IP Address and a cross-reference table.

I’m sure someone here must have done
something similar in the past and I was
wondering what the best method would
be for processing the data.

I can set up either an IP4 or IP6 database,
or one that has both, but the number of
records to search is over 400,000 for just
IP4. Is one easier than the other to implement?

What problems have people run into trying
to do this in the past, and what should I do?

Suggestions?

Thanks,

Rick
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


IP address and Country

2022-11-14 Thread harrison--- via use-livecode
Greetings LiveCoders,

I’m trying to set up an LC Server routine
to retrieve the country name where the user
is supposedly located by using the user’s
IP Address and a cross-reference table.

I’m sure someone here must have done
something similar in the past and I was
wondering what the best method would
be for processing the data.

I can set up either an IP4 or IP6 database,
or one that has both, but the number of
records to search is over 400,000 for just
IP4. Is one easier than the other to implement?

What problems have people run into trying
to do this in the past, and what should I do?

Suggestions?

Thanks,

Rick
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode