Forum Moderators: coopster

Message Too Old, No Replies

Blocking specific countries with PHP

         

adamnichols45

11:37 am on Apr 11, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Im quite sure it is possible to block specific countrys from accessing my site.

Is this a good idea?

I gather it would be best todo with php right?

barns101

11:48 am on Apr 11, 2008 (gmt 0)

10+ Year Member



It's possible, although you may need to find the IP range for the countries in question in order to block them.

As to whether it's a good idea will depend on why you're thinking of doing it. It'll be a good idea for some webmasters but not for others. :)

I'd have thought that the best way to do it would be .htaccess or by configuring Apache to do it even earlier (can't remember what that's called) rather than PHP.

jatar_k

3:25 pm on Apr 11, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



it's easy enough to do and you can find a bunch of geo location scripts/databases around