stop the htm loading

i want to stop the htm file load in certain  visitor browser
any idea how to do that ?

i have include the following line in my htm file,
the chkhttp.pl just to stop "die" the process..but the html file still loading to client browser..

how to i do that ?

<!-- #exec cgi="http://perl/chkhttp.pl"-->


loongAsked:
Who is Participating?
 
BanzaiConnect With a Mentor Commented:
You have to link directly to the script:
<a href="http://www.web-owners.com/test/ip_checker.cgi">Test it</a>
It will redirect to the different locations blocked IP's.
#!/usr/bin/perl
#Script by Banzai (A&B Web Design ©1999)
$ft="216.67.4.54";
$ft2="http://www.web-owners.com/errors/restricted.html"; #where to redirect if IP was bllocked
$ft3="http://www.web-owners.com/"; #where to redirect normaly
$cl = $ENV{'REMOTE_ADDR'};
print "Content-type: text/html\n\n";
if ($cl eq $ft)
{
print "<html><head><META HTTP-EQUIV=\"REFRESH\" TARGET=\"_self\" CONTENT=\"0;URL=$ft2\"></head></html>\n";
die;
  } else {
print "<html><head><META HTTP-EQUIV=\"REFRESH\" TARGET=\"_self\" CONTENT=\"0;URL=$ft3\"></head></html>\n";
}
0
 
loongAuthor Commented:
this is my ckhttp.pl

if ($ENV{'REMOTE_ADDR'} == "10.0.0.18" )
{
      die ;
# redirect("http://www.test.com");
 } else {
      print "hello";
}
0
 
KennyIT Application ExecutiveCommented:
You need to go to the PERL script first, and if the IP is the one that you wish to block, then you should die. Else, you can load the HTML page.

I noticed that in your HTML, the exec command is commented. It will not execute. Also, I don't think that is the way to exec scripts in HTML. You need to reference it (A HREF=???.pl)
0
Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

 
ozoCommented:
Also, == is a numeric comparision.  you want eq for a string comparison
0
 
loongAuthor Commented:
still cannot block..
any idea how to blocked ?
0
 
BanzaiCommented:
You have to link directly to the script:
<a href="http://www.web-owners.com/cgi-bin/ip_checker.cgi">Test it</a>
0
All Courses

From novice to tech pro — start learning today.