How to redirect domain according to country IP address
The PHP web service allows you to directly program your back-end PHP scripts to deliver dynamic geo-localized pages using the PHP array provided by GeoPlugin.
For access this service, you need to add the following url to a remote include call
http://www.geoplugin.net/php.gp?ip=xx.xx.xx.xx (in the place of 'xx.xx.xx.xx.' you can use your IP Address like '11.22.33.44')
Add the below code in your php file where you want and then change the 'IN' to your country code like 'UK', 'USA', etc., and in the place of domain name 'https://appclave.com' to your domain.
Popular Posts Hits
How to redirect domain according to country IP address
The PHP web service allows you to directly program your back-end PHP scripts to deliver dynamic geo-localized pages using the PHP array provided by GeoPlugin.
For access this service, you need to add the following url to a remote include call
http://www.geoplugin.net/php.gp?ip=xx.xx.xx.xx (in the place of 'xx.xx.xx.xx.' you can use your IP Address like '11.22.33.44')
Add the below code in your php file where you want and then change the 'IN' to your country code like 'UK', 'USA', etc., and in the place of domain name 'https://appclave.com' to your domain.
If you would like to print or debug geo location API then use the below code.
You can check more details about the geo location API at http://www.geoplugin.com/webservices/php
We hope it will helpful to all visitors!!
Already have an account? Login into comment