GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Blocking certain countries / IP ranges...... (https://gfy.com/showthread.php?t=614373)

The Ghost 05-26-2006 05:02 AM

Blocking certain countries / IP ranges......
 
What is the best method for blocking certain countries from accessing your sites? Thanks!

The Ghost 05-26-2006 05:47 AM

Quote:

Originally Posted by The Ghost
What is the best method for blocking certain countries from accessing your sites? Thanks!

countries = ip ranges

u-Bob 05-26-2006 05:54 AM

www.maxmind.com
www.ip2location.com

Reak AGV 05-26-2006 05:55 AM

Bump for you.

broke 05-26-2006 05:57 AM

Are you looking to block at a firewall or via .htaccess?

Via .htaccess you can add:

<Limit GET HEAD POST>
order allow,deny
deny from xxx.xxx.xxx.xxx
deny from xxx.xxx.xxx
deny from xxx.xxx
deny from xxx
allow from all
</LIMIT>

To block a specific IP add the whole IP to the deny line. To block a range use a partial IP address.

psili 05-26-2006 05:58 AM

Quote:

Originally Posted by u-Bob

Yea. Just do a country lookup using the above software and do your redirect based on that. It's as easy as something like:

Code:

include("/other/company/ip_lookup_code.php");
$country = getCountry();
switch($country)
{
  case "UK":
    header("Location: http://www.badteeth.com;);
  break;
  case "JP";
    header("Location: http://www.iwannafuckahotjapanesechick.com");
  break;
  ............
}


Lycanthrope 05-26-2006 06:01 AM

Mod_GeoIP and Maxmind's database. The free one is good, the paid versions are obviously better

The Ghost 05-26-2006 07:05 AM

Everyone so far.... thank you for the information. :)

fris 05-26-2006 07:05 AM

ya mod_geoip works wonders

pussyluver 05-26-2006 07:18 AM

Damn a business thread! Thanks for the info, esp the scripting.

The Ghost 05-26-2006 07:24 AM

Quote:

Originally Posted by pussyluver
Damn a business thread! Thanks for the info, esp the scripting.

lol.... yeah, they sneak in here every once-in-a-while :winkwink:


All times are GMT -7. The time now is 08:13 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123