View Full Version : Lock out a curtain country from entering a site
Chris242
10-03-2002, 02:05 AM
Does anyont know a java script to lock out visitors from a certain country? Or a javascript that cal lock out serveral internet providers.
whammy
10-03-2002, 02:08 AM
In order to do that you'd probably have to have a range of IP addresses that pertain to that particular region (which is not too easy to figure out), and you can't do it with javascript, you'd need to use a server-side scripting language such as PHP, ASP, etc.
Quiet Storm
10-03-2002, 02:35 AM
It might be done with JavaScript...
What country were you thinking of blocking?
Chris242
10-03-2002, 10:59 AM
I would like to block the visitors from Belgium. It can't be that hard to do it because there are not that much internet providers in Belgium. The 2 biggest providers in Belgium are
- Telenet and the first numbers of the IP is always 213.224.***.*** and in some parts of Belgium that is 213.118.***.***
- Skynet ADSL 217.136.***.***
I'm sure if I can block those two providers that at least 70% of the Belgian visitors can be locked out.
What's wrong with Belgium? They make good beer and nice chocolates!
:D
....Ummmm, wouldn't that block YOU from the site too?
MCookie
10-03-2002, 03:58 PM
>> there are not that much internet providers in Belgium.
These are the members of the ISPA, the Belgium Internet Service Providers Association: Belgacom, BelNet, Cable & Wireless, Planet Internet, Telenet, Tiscali, UPC, UUNet, Wanadoo.
Found some others too: BelCenter, BelgacomNET, BelgacomBusinessNET, Charline Production, CompaqNET, Contact On Line, EDPfree, FreeWeb, FreeWorld, Ip-master, Infobel.net, KidCity, Oneweb, SelexionNET, SwinG, Tijd, Tiscali, VT4.net, Zon.
And there must be more.
whammy
10-04-2002, 02:48 AM
I *personally* wouldn't want to block internet users from belgium, as the belgian language version of google.com lists my site pretty highly. :)
I just don't see the reasoning behind blocking anyone from a certain country, anyway... you might make a friend from there... :)
If you're looking to block a certain person, just block their IP address... if they have a dynamic IP address (as is usually the case with slow connections, such as modem), then make people login to your site to gain access... then you can monitor their activities on your site. :D
Chris242
10-04-2002, 03:15 AM
I don't know how to respond to each posted message so I'm going to do it like this :
To Ökii
Yes, it would block me from my site too because I'm also in Belgium, but that is not a problem because I know what my site looks like :)
To MCookie
Most of the providers in your list are owned by the same company named Skynet. Most of the others in your list are slow providers which give access to the net using a dail-modem. Almost nobody is using these slow 56kbits connections anymore.
To Whammy
If have found and used the following script :
<script language="javascript">
var ip = '<!--#echo var="REMOTE_ADDR"-->'
if (ip == '000.000.000.000') {
alert("STOP! You are viewing this page from an IP address that is not allowed!");
alert("Why can't you guys just leave me alone?");
if (confirm("Do you want to leave peacefully? Or will I have to help you?"))
{location.href="http://www.yahoo.com" } else { ("OK you choose I don't care! Bye bye! Don't come back!"); {location.href="http://www.yahoo.com" }} }
</script>
It didn't work.
Guess I need something stronger than that :D
^KoalaBear^
10-04-2002, 05:06 AM
:D *waits with baited breath for continuing episodes to this intriguing thread!!* :D
joh6nn
10-04-2002, 05:41 AM
<script language="javascript">
window.onload = function() {
var ip = document.SSI.IP.value;
if (ip == '000.000.000.000') {
alert("STOP! You are viewing this page from an IP address that is not allowed!");
alert("Why can't you guys just leave me alone?");
if (confirm("Do you want to leave peacefully? Or will I have to help you?"))
{location.href="http://www.yahoo.com" } else { ("OK you choose I don't care! Bye bye! Don't come back!"); {location.href="http://www.yahoo.com" }} }
}
</script>
<form name="SSI">
<INPUT NAME="IP" TYPE="hidden" VALUE="<!--#echo var="REMOTE_ADDR"-->">
</form>
remember that this will only work if you have SSI on your server.
MCookie
10-04-2002, 10:09 AM
From ripe.net.
be.alexsys (ALEXSYS s.a./n.v.)
217.174.0/20
be.asp (AB Computers)
80.65.128/20
be.assurnet (Assurnet S.C.)
212.79.64/19
be.belgacom (BELGACOM)
195.13/19
213.181.32/19
be.belnet (BELNET)
193.190/16
193.191/16
be.brutele (Brutele SC)
212.68.192/19
212.68.224/19
213.189.160/19
213.213.192/18
be.btbelgium (BT Belgium)
62.102/17
212.8.160/19
be.ccbgkb (Credit Communal SA)
212.63.224/19
be.cirb (CIRB-CIBG)
195.244.160/19
be.codenet (TRASYS - Codenet)
195.16.0/19
212.88.224/19
213.251.64/18
be.coditel (Coditel Brabant)
212.76.224/19
be.colt (COLT Telecom Belgium)
62.72.96/19
212.35.96/19
be.cybernet (Cybernet ISP SPRL)
213.177.64/19
be.easynet (Easynet Belgium)
212.100.160/19
213.193.128/18
be.edp (EDPNET)
212.71.0/19
213.219.128/18
be.euronet (Wanadoo BELGIUM S.A.)
80.236.128/17
195.74.192/19
213.177.128/19
be.fox-it (FOX-IT)
217.67.64/20
be.getronics (Getronics Belgium NV / SA)
62.233/19
be.globe (Online Internet nv/sa)
62.112/19
194.88.96/19
be.hostit (HostIt NV)
212.113.64/19
be.icl (ICL Belgium)
62.116.192/19
be.idnet (IDnet)
217.76.224/20
be.imaginet (ImagiNet Belgium)
195.138.192/19
be.inet (INnet / UUNET Belgium)
194.7/16 ALLOCATED UNSPECIFIED
212.190.0/16
be.interweb (Interweb)
212.122.32/19
be.isabel (ISABEL)
195.122.96/19
be.itgration (Itgration Services nv.)
212.53/19
be.kpno (KPN-Orange Belgium)
217.72.224/20
be.kredietbank (KREDIETBANK)
193.244/15
be.linkline (Tiscali Belgium SA/NV)
212.35.0/19
213.151.32/19
be.lvlt (Level3 Communications International)
212.3.224/19
213.249.64/18
be.marben (Atos s.a.)
195.26.64/19
be.mlink (M-Link Teleport SA)
213.177.160/19
be.mobistar (Mobistar)
212.65.32/19
212.224.128/17
be.net4all (NET FOR ALL)
81.89.96/20
be.netfusion (NetFusion NV)
62.205/19
be.nrb (Network Research Belgium)
62.197.64/18
217.117.32/20
217.117.48/20
be.obsys (OBSYS BE)
217.145.32/20
be.perceval (Perceval)
194.183.224/19
be.pietercil (Pietercil Resta Food Brokers nv)
212.105.128/19
be.ppc (IP MASTER NV)
195.5.96/19
be.pronet (Pronet)
212.80.0/19
be.psinet (PSINet-Europe, Inc.)
195.72.64/19
212.221/17
be.seagha (Seagha)
217.66.0/20
be.skynet (Belgacom Skynet)
62.4.128/19
62.4.160/19
62.4.192/18
80.200/15
194.78/16
217.136/16
be.sony-ite (SONY ITE a division of SONY Service Europe Center)
80.88.32/20
be.sprintlink (Sprintlink)
80.66.128/20
be.tectrade (Tectrade Network)
81.29.160/20
be.telenet (Telenet)
81.82/15
195.130.128/19
212.123.0/19
213.118/15
213.224/19
213.224.32/19
213.224.64/18
213.224.128/17
be.telerelay (TeleRelay NV)
213.164.192/19
be.tvd (TVD Internet - UPC Belgium)
62.205.64/18
195.162.192/19
213.132.128/19
be.unisource (Unisource Business Networks Belgium)
81.11.128/17
193.74/16 ALLOCATED UNSPECIFIED
193.75.128/17
193.91.32/20
193.91.96/19
193.121/19
193.121.32/19
193.121.64/18
193.121.128/17
194.119.224/19
195/17
195.43.96/19
195.95/17
195.207/16
212.239.128/17
213.49/16
be.visitronics (Visitronics)
217.24.64/20
be.win (WIN S.A.)
212.166.0/18
be.wol (World Online)
62.235/16
212.233/18
Roy Sinclair
10-04-2002, 03:39 PM
Originally posted by ^KoalaBear^
:D *waits with baited breath for continuing episodes to this intriguing thread!!* :D
Bated breath is the term, Baited breath makes it sound like you've just eaten from your fishing tackle box :p .
mordred
10-04-2002, 04:13 PM
Isn't that a bit of useless scripting? I mean, your potential visitors could just turn off javascript and proceed viewing your page. And because you have to rely on some server-side functionality to make your scripts work, why don't do it completely on server-side (PHP, ASP, JSP... whatever)?
Though I have to say that I believe that your request, how profound your reasons may be, is against the spirit of openness of the world wide web...
Is your content anti-Belgians?
murphyz
10-04-2002, 05:19 PM
I went to Belgium a couple of months ago, to Brugge and to Ghent.
Nice art, nice beer, nice chocolate.
I ended up chasing a midge around my hotel room at 4 in the morning as it kept dive-bombing the mistress and I.
I am also intrigued as to why you want to ban Belgium from your site :)
Mxx
MCookie
10-05-2002, 03:05 AM
If you can use Perl and SSI here's a script that can redirect every country you want.
Click here to test it: http://www.mimtech.com/cgi-mimtech/redir_demo.pl
Go here to read more: http://www.mimtech.com/doc/SmartRedirector.html
whammy
10-05-2002, 03:09 AM
I think it's unanymous - why do you want to ban Belgium?
I have met a lot of nice people from Belgium...
adios
10-05-2002, 03:12 AM
hey whammy.....
got that new espresso maker I see [:eek::eek::eek::eek:]
adios
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.