Endpoint used to lookup IP address informations. To make this work properly, you must have a valid KEY and Access Token API.
https://yourdomain.com/wp-ajax.php?action=cf_geoplugin_lookup
Expected GET or POST parameters.
Parameter | Type | Obligation | Description |
---|---|---|---|
action | string | required | Endpoint action. Should always be: cf_geoplugin_lookup |
api_key | string | required | API KEY |
access_token | string | required | Generated access token |
ip | string | required | Client IP address |
base_currency | string | optional | The base currency (transaction currency) – The currency by which conversion is checked by geo location. Default: USD |
Return standard JSON API response format:
{ "ip" : "217.138.192.36", "ip_version" : 4, "ip_dns" : "", "ip_dns_host" : "", "ip_dns_provider" : "", "ip_number" : "3649749028", "country_code" : "GB", "country" : "Great Britain", "region" : "England", "region_code" : "", "state" : "England", "city" : "United Kingdom", "continent" : "Europe", "continent_code" : "EU", "address" : "United Kingdom, England, Great Britain", "area_code" : "", "dma_code" : "", "latitude" : 51.508529663086, "longitude" : -0.12574000656605, "timezone" : "Europe\/Zurich", "locale" : "en_GB,ga_GB,cy_GB,gd_GB,kw_GB", "timezoneName" : "Europe\/Zurich", "currency" : "GBP", "currency_symbol" : "£", "base_currency" : "USD", "base_currency_symbol" : "$", "currency_converter" : 0.7684, "host" : "wpgeocontroller.com", "ip_host" : "176.9.103.101", "timestamp" : 1580843778, "timestamp_readable" : "Tue, 04 Feb 2020 19:16:27 +0000", "current_time" : "19:44:20", "current_date" : "February 4, 2020", "is_vat" : 1, "in_eu" : 1, "gps" : 0, "accuracy_radius" : "200km", "runtime" : 0.28025, "error" : false, "error_message" : "", "code" : 206 }
You can use these JSON information in your external app anywhere.
TIP: In order for your external app to be fast, it would be good to make this call once and record in a temporary session that will expire after few minutes.