Getting brief information about a user as a JSON object by his IP address. This function uses local database and does not need the Internet connection.

 

Syntax

function GeoIPGetQuickInfo(sIP: string): string;

 

Parameters and return values

Parameter

Type

Value

sIP

string

user IP address.

 

Function result

User's location as "Country|City". If there is no data about country or city, there will be only one part. The delimiter is a vertical line — "|". If there is an invalid IP address or no data, the function returns an empty string.
 

Example


const
  IP = '94.45.98.236';
begin
  mLogScript('IP address: ' + IP, '');
  mLogScript('Quick info: ' + GeoIPGetQuickInfo(IP), '');
end.


Script work result

[19:33:42] (Log "GeoIPGetQuickInfo"): IP address: 94.45.98.236

[19:33:42] (Log "GeoIPGetQuickInfo"): Quick info: Ukraine|Fastov

[19:33:42] (Run "GeoIPGetQuickInfo"): Script operation time: 12 ms

[19:33:42] (Run "GeoIPGetQuickInfo"): Script done successfully.

 

See also

Fetch

mLogScript