views:

63

answers:

2

i want to redirect all traffics coming from thailand to another domain

how can i do this in php ?

A: 

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.

Sarfraz