![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Mar 2005
Posts: 2
Rep Power: 0
![]() |
Dear I have website it also have a feedback form.
I am using cgiemail form v1.6 The user mostly submit the feedback form more than one time. Some times a form submitted more that 10 times with the same Ip address. I want to restrict submit with one IP Address for atleast 24 hours. My site hosted at linux \ unix based server I do not know JSP or PHP. Please help me to solve this problem email me at davidjohny@yahoo.com Thankyou in advance David Last edited by david; Mar 31st, 2005 at 7:54 PM. Reason: changing colour |
|
|
|
|
|
#2 |
|
Programming Guru
![]() |
I'll help you as soon as you post in something besides that annoying large font.
|
|
|
|
|
|
#3 |
|
Programming Guru
![]() |
1. yes anoying font
2. dont restrict by ip address, according to website i only have 1 external ip address yet i have 3 pc's on my network so therefore if 3 people want to submit from the same network they cant due to being on the same ip address. |
|
|
|
|
|
#4 |
|
Programmer
Join Date: Jan 2005
Posts: 44
Rep Power: 0
![]() |
not sure if this will help but i'd have a look into sessions/cookies and how to limit there life. a dont think it goes off ips but i think it goes off the actual users computer
have fun magic e Last edited by magic_e; Apr 2nd, 2005 at 11:54 AM. |
|
|
|
|
|
#5 | |
|
Professional Programmer
Join Date: Jun 2004
Location: South Africa, Johannesburg
Posts: 301
Rep Power: 5
![]() |
Quote:
__________________
[SIGPIC][/SIGPIC] |
|
|
|
|
|
|
#6 |
|
Programming Guru
![]() |
true but the only proper way would be to have a user loging and keep track of if the user has posted during the current day.
|
|
|
|
|
|
#7 |
|
Programming Guru
![]() |
It's simple...
create database restrict (
id int not null primary key auto_increment,
ip varchar(35),
time timestamp
);[php] <?php mysql_connect("localhost", "root", ""); mysql_select_db(""); mysql_query("delete from restrict where time >= " . time() + (24*3600)); $result = mysql_query("select * from restrict where ip =\"{$_SERVER['REMOTE_ADDR'}\""); if(mysql_num_rows($result) == 0) { $sql = "insert into restrict values('', '{$_SERVER['REMOTE_ADDR']}', '" . time() . "')"; mysql_query($sql); } else { die("You cannot access this page for 24hrs after you viewed it last..."); } mysql_close(); ?> [/php] |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|