Welcome to WebmasterWorld Guest from 54.205.75.60

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

i want to block my site in india

   
10:14 am on Nov 11, 2006 (gmt 0)

5+ Year Member



dear deligates

i have some good friends in india who try to abuse my site

I am fed up

help how can i block my site in india

thank you

1:28 pm on Nov 11, 2006 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



I think you can do it from your hosting panel easily to define a wild card IP series for India to block users from there BUT if you need an elegant php solution then write a code on your site pages that can read IP address of the visitor then match it with the wild card IP series of India (use regex) and if it is from India then redirect them to a friendly page where you can state your reasons for blocking them to use your sites.

by the way you should keep in mind that blocking Indian users can block some of your customers may be if you are selling anything on yoru site , it can hurt so think twice before doing it actually.

4:10 am on Nov 15, 2006 (gmt 0)

5+ Year Member



Hi,

You may use IP to Country Database from [ip-to-country.webhosting.info...] to convert the IP of any user to its country location and accordingly redirect them to any page saying restricted access.

All you need to is export this database into a mysql database and read it using a simple query with php/mysql to resolve the location

6:11 am on Nov 15, 2006 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



vipink: why to take the hassle of importing the complete database locally and then query it .. just use cURL to give a call to any site script that converts IP to location and then redirect visitor accordingly however this will make your site (index or anyother page with this code) slow depending on the speed of results from the third party site
7:30 am on Nov 15, 2006 (gmt 0)

5+ Year Member



If they are determined to mess with your site then this will have no effect. For one thing, these IP-to-country mappings aren't always accurate, but more importantly it's easy enough to use a proxy somewhere in another country (or Tor) to bypass these kinds of blocks. If I were you I'd focus my efforts on blocking the specific behavior (e.g. implement capchas if they are flooding posts) rather than the country.
7:52 am on Nov 15, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



can u throw in some details on what these "i have some good friends in india who try to abuse my site " are doing. I am curious to know. Are they from a particular region? Somebody you know or what? Are they copying your website? Stealing Data? Reusing it? Maybe there are other options to stop them apart from banning their IP range.