Geoip: Add geoip_region_code() native.

This commit is contained in:
Arkshine
2014-08-05 20:08:20 +02:00
parent 95bc1703a6
commit b61ed9fa3e
2 changed files with 56 additions and 2 deletions
+13 -1
View File
@@ -97,4 +97,16 @@ native geoip_country(const ip[], result[], len=45);
*
* @return The result length on successful lookup, 0 otherwise.
*/
native geoip_city(const ip[], result[], len);
native geoip_city(const ip[], result[], len);
/**
* Look up the region/state code for the given IP address.
* e.g. "US-OH", "DE-HH", IT-82, "FR-U", etc.
*
* @param ip The IP address to look up.
* @param result The result of the geoip look up.
* @param len The maximum length of the result buffer.
*
* @return The result length on successful lookup, 0 otherwise.
*/
native geoip_region_code(const ip[], result[], len);