i want to redirect all traffics coming from thailand to another domain
how can i do this in php ?
i want to redirect all traffics coming from thailand to another domain
how can i do this in php ?
You need to get IP of the coming user using:
$_SERVER['REMOTE_ADDR'];
Now you have the IP, now you need to figure out whether this IP's intials represent Thailand and if so, you should redirect users then.
Find out Thailand initials of IP using online services like ip2country.
Answered here: http://stackoverflow.com/questions/230594/redirect-depending-on-the-country
PHP examples in one case here: http://ipinfodb.com/ip_location_api.php