Página 1 de 1

Get country code

Publicado: 11 Jun 2020 10:27
por MORTEZA420
Hello to all

How can I get the country like the following code?

Código: Seleccionar todo

function GetPublicIP(webip)
local webip = webip or 'http://my.ipaddress.is/';
local ret;
local ip;
local pip = "";

ret =HTTP.Submit(webip,{},SUBMITWEB_GET, 20, 80, nil, nil);
        if ret ~= "" then
                ip=ret:match("%d+%.%d+%.%d+%.%d+");
                if ip ~= nil and ret ~= ip then
                         pip = ip;
                end
        else
                pip = "";
        end
return pip;
end
on show

Código: Seleccionar todo

local ip=GetPublicIP(webip);

Input.SetText("Input1", ip);

Re: Get country code

Publicado: 11 Jun 2020 18:51
por MORTEZA420
Please help, my work is tied to this code

Re: Get country code

Publicado: 11 Jun 2020 19:59
por Agotaras123

Re: Get country code

Publicado: 12 Jun 2020 00:46
por usamakey



something like that?



MEGA.NZ
HIDE: ON
Hidebb Message Hidden Description




Re: Get country code

Publicado: 12 Jun 2020 01:44
por luasqlite
Gracias

Re: Get country code

Publicado: 12 Jun 2020 09:42
por MORTEZA420
Thank you, but I don't have the source and it didn't show Afghanistan, but it showed the IP correctly

ایپی رو درست نمایش داد ولی کشور نمایش نمیده چطوری محافظت کردی از فایل میشه به من هم یاد بدی هم وطن ؟

Re: Get country code

Publicado: 12 Jun 2020 11:57
por sendai
gracias

Re: Get country code

Publicado: 12 Jun 2020 14:59
por usamakey
MORTEZA420 escribió:
12 Jun 2020 09:42
Thank you, but I don't have the source and it didn't show Afghanistan, but it showed the IP correctly



Imagen


well
csv file update June 10, 2020


MEGA.NZ
HIDE: ON
Hidebb Message Hidden Description




Re: Get country code

Publicado: 12 Jun 2020 18:04
por dripro
testa colega

Re: Get country code

Publicado: 13 Jun 2020 17:16
por MORTEZA420
usamakey escribió:
12 Jun 2020 14:59
MORTEZA420 escribió:
12 Jun 2020 09:42
Thank you, but I don't have the source and it didn't show Afghanistan, but it showed the IP correctly



Imagen


well
csv file update June 10, 2020


MEGA.NZ
HIDE: ON
Hidebb Message Hidden Description




I need a source You have protected the file What should I do?

Re: Get country code

Publicado: 13 Jun 2020 17:53
por usamakey
project file
will be canceled tomorrow at 18.00


MEGA.NZ
HIDE: ON
Hidebb Message Hidden Description

Re: Get country code

Publicado: 13 Jun 2020 19:12
por MORTEZA420
usamakey escribió:
13 Jun 2020 17:53
project file
will be canceled tomorrow at 18.00


MEGA.NZ
HIDE: ON
Hidebb Message Hidden Description
Wow, the card is very good thanks

Re: Get country code

Publicado: 13 Jun 2020 21:11
por jhonitimer
Thank you