Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
|
New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help. |
|
Thread Tools |
06-19-2015, 03:47 PM | #1 |
Confirmed User
Industry Role:
Join Date: Feb 2006
Posts: 2,768
|
Geo redirect code
Hi,
I have this code to redirect traffic : Code:
<?PHP include('/home/domain/public_html/geoip/geoip.inc'); //this file must exist in your directory $gi = geoip_open('/home/domain/public_html/geoip/GeoIP.dat',GEOIP_STANDARD); // get the ip of the visitor $addr = getenv('REMOTE_ADDR'); // translate his ip to a country code $country = geoip_country_code_by_addr($gi, $addr); // close the geo database geoip_close($gi); $badcountry = array('TR','IN','ID',"PK","CN",'MY'); // You can change the example with any countries that you want to block // redirect them if they suck if(in_array($country, $badcountry)) header('Location: http://www.domain.com/'); //enter a url or page on your site ?> Thanks
__________________
List Of Sex Cams |
06-20-2015, 08:23 AM | #2 |
small trip to underworld
Industry Role:
Join Date: Mar 2012
Location: first gen intel 80386/nintendo-gb/arcade/ps1/internet person
Posts: 4,927
|
__________________
automatic exchange - paxum , bitcoin,pm, payza . daizzzy signbucks caution will black-hat black-hat your traffic ignored forever :zuzana designs
|