[ Index ] |
PHP Cross Reference of YOURLS |
[Source view] [Print] [Project Stats]
Function relative to the geolocation functions (ip <-> country <-> flags), currently tied to Maxmind's GeoIP but this should evolve to become more pluggable
File Size: | 153 lines (10 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
yourls_geo_ip_to_countrycode( $ip = '', $default = '' ) X-Ref |
Converts an IP to a 2 letter country code, using GeoIP database if available in includes/geo/ return: string 2 letter country code (eg 'US') or $default param: string $ip IP or, if empty string, will be current user IP param: string $default Default string to return if IP doesn't resolve to a country (malformed, private IP...) since: 1.4 |
yourls_geo_countrycode_to_countryname( $code ) X-Ref |
Converts a 2 letter country code to long name (ie AU -> Australia) This associative array is the one used by MaxMind internal functions, it may differ from other lists (eg "A1" does not universally stand for "Anon proxy") return: string Country long name (eg 'France') or an empty string if not found param: string $code 2 letter country code, eg 'FR' since: 1.4 |
yourls_geo_get_flag( $code ) X-Ref |
Return flag URL from 2 letter country code return: string param: string $code |
Generated: Sat Feb 22 05:10:06 2025 | Cross-referenced by PHPXref 0.7.1 |