Skip to main content

RequestIPInfo

AndroidiOSWindows
If you were looking for the method for use with Unreal Engine, see RequestIPInfo for Unreal Engine SDK.

Gets the corresponding country information of an IP address, and returns INTLLBSIPInfoResult in the callback result.

The source of the data (https://ip.woa.com/home/) ensures the accuracy of the data.

caution
  • The conversion between IPs and regions is not at 100% accuracy due to data source factors.
  • The API may fail to return results due to network jitter or other factors. It is not recommended to use it in critical game logic. Users must also consider the default adaptation policy in case of failure.
  • The conversion between IP and region will change by default with changes in the data in the IP database. If a fixed conversion between IP and region is needed, please reach out to the Player Network representative.

Function definition

public static void RequestIPInfo();

Observers

The callback processing interface is LBSIPInfoResultObserver.
The callback data structure is LBSIPInfoResult.

The callback methodID is INTL_LBS_REQUEST_IPINFO.

Code sample

INTLAPI.RequestIPInfo();