How determining the user's location by IP address
Returns the IATA code and the name of the nearest city from the user.
- locale — language in which the name of the city is returned (available: in, rue, de, fr, it, pl, th);
- callback — specifies the name of the function that contains the response to the request (required parameter);
- ip — Ip-address of the user (if the address is not transferred, the system determines ip from the header of the request).
Example of response
- iata — IATA-code of the city where the user is located;
- country_name — name of the country;
- coordinates — city coordinates;
- name — city name.
Was this article helpful?
Have more questions? Submit a request