You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-12Lines changed: 32 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,23 +26,43 @@ Internet connection is required to run this component.
26
26
27
27
## Basic Usage
28
28
29
-
Call method **get_location($apikey, $clientIp)** passing *IP address (optional)* and *API key* as parameters and it will return IP Geolocation API response.
30
-
Note: If you want IP to geolocation for the machine calling IPGeolocation API, leave out the *IP address* parameter.
29
+
Call method **get_geolocation($apiKey, $ip, $lang, $fields, $excludes)** passing _API key_ and _IP address_ as parameters (rest of the parameters are optional) and it will return the Geolocation for the passed IP address.
30
+
To customize the geolocation response, you can pass the other parameters to **get_geolocation** method as described below:
31
+
32
+
* $lang
33
+
Pass the _language_ parameter to get the geolocation information in a language other than English. By default, it is set to English language.
34
+
IPGeolocation provides response in the following languages:
35
+
* English (en)
36
+
* German (de)
37
+
* Russian (ru)
38
+
* Japanese (ja)
39
+
* French (fr)
40
+
* Chinese Simplified (cn)
41
+
* Spanish (es)
42
+
* Czech (cs)
43
+
* Italian (it)
44
+
Only the paid plan subscriptions can get the response in languages other than English. All the other users will only get the response in English.
45
+
46
+
* $fields
47
+
Pass the _fields_ parameter to get the specified fields only. By default, it is set to get all the fields in the response.
48
+
49
+
* $excludes
50
+
Pass the _exlcludes_ parameter to get remove the unnecessary fields from the response. By default, it set to not to exclude any fields.
0 commit comments