Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tracking IP problem. 3

Status
Not open for further replies.

perlone

Programmer
May 20, 2001
438
US
Hello everyone,

I'm kind of having a big problem tracking IP Addresses. See, I'm working on this game directory site where the
visitors gets to vote for their favorite game for the month. I only want the users to vote one time every month.
The problem is that they can restart their computer and vote again, since the internet will assign them random numbers.


I was wondering if there is any module or other way to avoid this type of problem. Thank you for reading.
There is no Knowledge that is not power.
Age: 16
E-mail: projectnet01@yahoo.com
Company:(not done yet) :)
Status: Currently working with C++ for game developing. And making a musical band.
-Aaron
 
Yea, it's a huge pain to do what you are trying to do. You could use cookies in addition to IP address authentication, however, they could just delete the cookies or not accept them at all.

The only 100% way, I think, would be to have the voter's register (i.e., Login w/ a Name/Password) and then place their votes. You could keep track of who has already voted, but then it wouldn't be anonymous.

--jim
 
Thank you Jim for responding. The user registration was my second idea, but I thouht they might just start duplicate accounts for their game. Until I found some module, I guess I have to go for cookies and registration. Something like it won't let them vote if their browser doesn't support cookies. Thanks again for your reply.
There is no Knowledge that is not power.
Age: 16
E-mail: projectnet01@yahoo.com
Company:(not done yet) :)
Status: Currently working with C++ for game developing. And making a musical band.
-Aaron
 
Hi,

but they can login many times
Their will always be a loop hole :)

Anthony
 
Well, if you track that user X has already voted, then the next time user X logs in, they won't be able to vote again. Becuase you have a record with their name on it. The loop hole with that is "how do you know one person doesn't have 30 different accounts?"

--jim
 
You could do email confirmation when setting up a new account and limit each email address to one account. The loophole still remains that a user may have more than one email address, but someone having 30 email addresses is unlikely. It would limit the abuse some.

jaa
 
Thanks guys. Also I could add some extra feature like deleting the accounts if the user haven't logged in for 25 days. And for the loop, I could use the flock function to lock it. There is no Knowledge that is not power.
Age: 16
E-mail: projectnet01@yahoo.com
Company:(not done yet) :)
Status: Currently working with C++ for game developing. And making a musical band.
-Aaron
 
Ues a more stable header variable rather than IP address. I believe the computer name comes across as a header variable. Whenever I want to look at odd header variables that I rarely use ( and thus do not memorize) is by running a header dump loop. Try it, and look at all the items that you might choose from as an ID.
 
grokker, I have no idea what you just said ;). How do I check the header loop?
There is no Knowledge that is not power.
Age: 16
E-mail: projectnet01@yahoo.com
Company:(not done yet) :)
Status: Currently working with C++ for game developing. And making a musical band.
-Aaron
 
print &quot;$_ -> $ENV{$_}<br>\n&quot; while keys %ENV;

This will display the server environment variables for your CGI script. It's not a complete script by itself though... you'll still need to print a header.

--jim
 
Sorry, I'm not paying attention:

print &quot;$_ -> $ENV{$_} <br>\n&quot; for keys %ENV;

Sorry bout that.

--jim
 
dosent seem to work Coderifous ...
here the way i do it

Code:
foreach (%ENV) { print $_ . &quot; : &quot; . $ENV{$_} . &quot;<br>\n&quot;; }
---------------------------------------
wmail.jpg


someone knowledge ends where
someone else knowledge starts
 
I don't know what's wrong on your end, but the code in my above post (once corrected: s/while/for/;) is fine.

I regret to inform you, however, that your snippet treats both the keys and the values of the ENV hash as keys. This produces results not representative of the actual hash.

You would need to use the keys function in your foreach loop expression to return only the keys of the hash

--jim
 
Thanks guys! There is no Knowledge that is not power.
Age: 16
E-mail: projectnet01@yahoo.com
Company:(not done yet) :)
Status: Currently working with C++ for game developing. And making a musical band.
-Aaron
 
Question: I got the list from the page. But how does it helps me track the person? Is there anything that is unique like an ID?

If so, what do you think that I should choose. Thank you.

QUERY_STRING -> QUERY
SERVER_ADDR -> 127.0.0.1
HTTP_ACCEPT_LANGUAGE -> en-us
SERVER_PROTOCOL -> HTTP/1.1
HTTP_CONNECTION -> Keep-Alive
SERVER_SIGNATURE ->
Apache/1.3.19 Server at 172.173.189.160 Port 80

COMSPEC -> C:\WINDOWS\COMMAND.COM
REMOTE_PORT -> 1122
HTTP_USER_AGENT -> Mozilla/4.0 (compatible; MSIE 5.5; CS 2000 6.0; Windows 98)
HTTP_ACCEPT -> image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
PERL_SEND_HEADER -> On
HTTP_HOST -> localhost
GATEWAY_INTERFACE -> CGI-Perl/1.1
WINDIR -> C:\WINDOWS
SERVER_SOFTWARE -> Apache/1.3.19 (Win32) mod_perl/1.24_01 PHP/4.0.4pl1 DAV/1.0.2 mod_ssl/2.8.1 OpenSSL/0.9.6
SERVER_ADMIN -> projectnet01@cs.com
REMOTE_ADDR -> 127.0.0.1
SCRIPT_NAME -> /cgi-bin/c.cgi
SERVER_NAME -> 172.173.189.160
HTTP_ACCEPT_ENCODING -> gzip, deflate
DOCUMENT_ROOT -> c:/program files/a/apache/htdocs
REQUEST_URI -> /cgi-bin/c.cgi?QUERY
MOD_PERL -> mod_perl/1.24_01
REQUEST_METHOD -> GET
SCRIPT_FILENAME -> c:/program files/a/apache/apps/cgi-bin/c.cgi
PATH ->

SERVER_PORT -> 80 There is no Knowledge that is not power.
Age: 16
E-mail: projectnet01@yahoo.com
Company:(not done yet) :)
Status: Currently working with C++ for game developing. And making a musical band.
-Aaron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top