Script that redirects users based on location?

comoregion

Registered Member
Joined
Nov 26, 2012
Messages
55
Reaction score
9
I'm looking for website script that will send users to different pages based on their location. For example, somebody from Switzerland visits the homepage. They would then be redirected to a page specifically designed for their country.

I'm not sure if there's a script like this, but I have feeling there might be.

All replies are appreciated.
 
Search for cloakers. Here are some members who provide these for you.

Cheers
 
Here you go:

Code:
<?
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$country = geoip_country_code_by_name($_SERVER['REMOTE_ADDR']);
$redirect=false;
if (strstr(strtolower($hostname), ".ch")) { $redirect = true; };
if (strtolower($country) == "ch") { $redirect = true; };

if ($redirect) {
  header ("Location: http://google.ch");
} else {
  header ("Location: http://google.com");
};
?>
 
i guess there is a plugin WP geo redirect and you can build your own for a html with some free geo ip scripts.
 
You need to purchase a subscription to a geoip data service or a one time database purchase. Then you run some script like suggested by another member on this thread. Note, though, the geoip functions are not free of charge, you need to subscribe to some Geo IP solution.
 
Back
Top