If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Advanced Poll 2.0.2: IP-address storing  XML
Forum Index » Support Forum
Author Message
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
Anonymous



id like to know how to do this also...anyone??
Anonymous



The IP-address is stored in the table 'poll_ip' for a short time
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.
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;
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
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.
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
Anonymous



I dont know, rluka. Tell me plz if you know! It`s interesting...
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.
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum