Author |
Message |
03/03/2003 15:51:11
|
Anonymous
|
The IP-address of voters is detected, but not stored in the database. So if i disable cookies on my browser, i can vote for infinite times. I want to give only one chance to vote to particular IP-address. How Can I do it?
I have looked through the include/*.php but find nothing wrong
|
|
11/03/2003 01:06:26
|
Anonymous
|
id like to know how to do this also...anyone??
|
|
11/03/2003 01:11:12
|
Anonymous
|
The IP-address is stored in the table 'poll_ip' for a short time
|
|
12/03/2003 12:41:32
|
Anonymous
|
i resolved my problem by
putting the string:
$this->pollvars['check_ip']=2;
in metod poll() of class class_poll. The ip-address is checked now.
So it seems to be strange that i have not found any config parameter
for this and had to set it manually.
|
|
15/03/2003 00:18:47
|
rluka
Beginner
Joined: 14/03/2003 04:53:30
Messages: 14
Offline
|
Great Info
I just screwed up in where I placed it: I'm assuming that "metod" is "method". I'm new to php and would really appreciate it if you could tell me where to put this code in the file(Line #). When I tried it at the beginning of the file it didn't work.
Thanks..rluka
method poll()
$this->pollvars['check_ip']=2;
|
|
15/03/2003 09:23:29
|
rluka
Beginner
Joined: 14/03/2003 04:53:30
Messages: 14
Offline
|
Okay
I found another way to do this:
Go to your MySQL data base on your server. Its probably sql.HostName.com
I'm using phpMyAdmin 2.2.4 with MySQL 3.23.54 on mine.
Left click on your data base name. In your table click on "Browse" next to
"poll_config". Now, click on "Edit". I have two edit choices. Don't choose "SQL-query:[Edit]" Now scroll down to "check_ip" and set that value to "2" click on "Go" at the bottom and you done.
I hope this is clear and helps...rluka
|
|
17/03/2003 13:16:29
|
Anonymous
|
The location:
/include/class_poll.php in your installation directory
find function poll ()... Now you can place the string
$this->pollvars['check_ip'] = 2;
after the string
$this->pollvars = $this->db->fetch_array($this->db->query("SELECT * FROM ".$this->tbl['poll_config']));
It will set the value of parameter 'check_ip' to '2' in the database.
The number of this line is between 35 and 40 (I have edited the code, so can not tell you exactly).
I think that your way to do this is better. So use editing database directly (via phpMyAdmin or something else) if it works.
|
|
18/03/2003 23:04:03
|
rluka
Beginner
Joined: 14/03/2003 04:53:30
Messages: 14
Offline
|
I don't think my way is better. Its just easier because I don't have a lot of experience in PHP programing.
In phpMyAdmin I have "lock_timeout" set to "2". Is that in hours?
rluka
|
|
21/03/2003 09:08:01
|
Anonymous
|
I dont know, rluka. Tell me plz if you know! It`s interesting...
|
|
21/03/2003 09:52:00
|
Anonymous
|
Sorry, I don't know. The problem that I'm having is that I'm running this poll from http://www.webhost.com/~mylogin/Poll/survey.php so I don't have access to any of the /Poll/admin/ features. The only way I can edit
this is through sql.webhost.com and it doesn't specify whether "2" means
seconds or years. I'm working on it though.
I'm just an old .html hack from years ago and I'm finding this .php language really fascinating.
|
|
|