This free plug-in allows you to get your website visitor’s geo-location by an ip-address.
If you need to redirect your visitor based on his city or country you can do that by using simple interface.
Also you can ask is visitor’s city or country like detected and forward him to specific page or add query params.
Advantages:
JSON API for independent developing
Unlimited redirect settings
Simple backend usage:
<?php foxlis_geo()->getCity(); ?>
<?php foxlis_geo()->getCountry(); ?>
<?php foxlis_geo()->getContinent(); ?>
<?php foxlis_geo()->getSubdivisions(); ?>
<?php $locationEntity = foxlis_geo()->getLocation(); $accuracyRadius = $locationEntity->getAccuracyRadius(); ?>
<?php $locationEntity = foxlis_geo()->getLocation(); $latitude = $locationEntity->getLatitude(); ?>
<?php $locationEntity = foxlis_geo()->getLocation(); $longitude = $locationEntity->getLongitude(); ?>
<?php $locationEntity = foxlis_geo()->getLocation(); $timeZone = $locationEntity->getTimeZone(); ?>
Get visitor location by JSON API using URL-path: /wp-json/foxlis-geo/v1/data/
Redirect By Geo Location Video Tutorial: