Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

RE: Checking user's IP....

by vroom (His Eminence)
on Jan 23, 2000 at 05:02 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2024-04-26 05:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found