문제

I am calling ipinfodb via JS. Recently I have had around 5-6 responses (from around 600) that specify the countryCode as 'RD'.

'RD' isn't a ccTLD and I cannot find any reason for this to be returned. Has anybody had a similar issue and did you find a fix?

I am calling ipinfodb on the route

http://api.ipinfodb.com/v3/ip-country/?key=_apikey_&ip=_ip_
도움이 되었습니까?

해결책

RD is returned as a pseudo-country code for reserved IP addresses.

This includes things like private addresses, class D and E networks (IPv4) and loopback.

For a complete list of addresses that will return this value, see here.

I can't actually find this behaviour documented anywhere, but experimentation easily demonstrates that this is the case, and moreover the <CountryName> element is populated with the word "Reserved" in these cases.

다른 팁

RD is a short country code for "RESERVED" IP address range. It is a range reserved for certain networking purpose as approved by IETF.

This code is only used in IPInfoDB version 2 which has been deprecated.

You should upgrade to latest version 3 API which is constantly updated.

In v3, you will only see "-" in the country code results to avoid this confusion.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top