Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

RE: Checking user's IP....

by vroom (His Eminence)
on Jan 23, 2000 at 05:02 UTC ( #2352=note: print w/replies, xml ) Need Help??


in reply to Checking user's IP....

You could log the IP addresses to a file and then search it. If you're running your site with a database you could log them to a table.
$address=$ENV{REMOTE_ADDR}; open FILE, "<logaddresses.dat"; my $addresses; { local $/=undef; $addresses=<FILE>; } close FILE; if($addresses=~/\Q$address/){ print "You already voted\n"; } else{ open FILE, ">>logaddresses.dat"; print " $address\n"; close FILE; # update poll; } #display results;
if you want code for a database solution let me know

Replies are listed 'Best First'.
Re: RE: Checking user's IP....
by Anonymous Monk on Sep 13, 2001 at 19:36 UTC
    I had the code checking user IP but I need the code to search IP address and if IP address is found, redirect to the found IP address by connecting open connection to telnet using the found IP address. I would appreciate if you could help me with this code. Thanks

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://2352]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2023-02-07 22:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (40 votes). Check out past polls.

    Notices?