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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
ozoCommented:
Also, == is a numeric comparision.  you want eq for a string comparison
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

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/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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Perl

From novice to tech pro — start learning today.