IsPrivateIPAddress (open)

Is an address a private IP address? (localhost or other private space)

Syntax

LOADLIB "wh::internet/tcpip.whlib";

BOOLEAN FUNCTION IsPrivateIPAddress(STRING address)

Parameters

STRING address

IP address to check

Return value

BOOLEAN

TRUE if the IP address is local or private

Description

Tells whether the address should be considered local or private, eg 192.168., 127.0.0.1, 10., ::1.... This should never be used for any security or authentication purposes, but can be useful to eg. return default values for GEOIP checks