Forgot Password / Register
Site Statistics
Total Members: 520
Total Tutorials: 242
Newsest User: 8884244477
Todays Unique Hits: 278
0 Users 4 Guests Online
Forum Index » PHP + MySQL » Block Visitors Country
Posted on Monday 11th June 2007 at 01:58 PM
gbt91
templates/default/images/noavatar.png's Avatar
Junior Member
Hi Guys,
I've been looking around for this script..
it consist on redirecting visitor that come from a determinate country so they cant access to my site..
too spam ;S
Can someone help me out?
test it first
Posted on Monday 11th June 2007 at 11:37 PM
ShadowMage
templates/default/images/noavatar.png's Avatar
Senior Member
:S dunno how to do that i'll look into it for ya
Posted on Tuesday 12th June 2007 at 01:32 AM
Diablosblizz
templates/default/images/noavatar.png's Avatar
Senior Member
I googled, and it could be actually very simple if you knew how to get the users country.

It would be something like:

<?php
$thevar = $w.etogetthecountry

if($thevar == 'Canada'){
echo "YOUR ST00PID get out!";
} else {
echo "Your Cool you can stay!";
}
?>

:S
Posted on Tuesday 12th June 2007 at 05:47 AM
SkillMaster
templates/default/images/noavatar.png's Avatar
Senior Member
the $w.etogetthecountry is the hard part.
Posted on Tuesday 12th June 2007 at 11:08 AM
gbt91
templates/default/images/noavatar.png's Avatar
Junior Member
actually i've found out..
just add to you .htaccess
deny from .(country)
i add the tut check it ouk xD
Posted on Tuesday 12th June 2007 at 08:02 PM
SkillMaster
templates/default/images/noavatar.png's Avatar
Senior Member
nice work