CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Ignore IP address

 



lordbane
Deleted

Aug 7, 2000, 9:47 AM

Post #1 of 2 (282 views)
Ignore IP address Can't Post

Does someone know how to get a script tp ignore a certain IP address? (I want my stats script to ignore my IP)


Kanji
User

Aug 7, 2000, 3:23 PM

Post #2 of 2 (282 views)
Re: Ignore IP address [In reply to] Can't Post

It's hard to answer when you don't ellaborate on the context, but yes, it's possible.

<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>

my %ignore = map { ( $_, ) } qw(
192.168.0.5 10.11.12.13
10.0.0.1 172.16.0.253
);

while ( ...something... ) {
my $ip = &get_ip;
next if $ignore{ $ip };
}</pre><HR></BLOCKQUOTE>

... although you would need to substitute more appropriate routines or filehandles in place of ...something... and &get_ip.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives