xyn Posted July 2, 2006 Share Posted July 2, 2006 Hi guys,I know Cookies are easier to work with when it comes to time, But I was wondering How to set a cookie for 24 hours... it's so if a member rated another member it would only allow one rating Per 24 hours... Quote Link to comment Share on other sites More sharing options...
karthikeyan_coder Posted July 2, 2006 Share Posted July 2, 2006 [quote author=xyn link=topic=99227.msg390704#msg390704 date=1151872652]Hi guys,I know Cookies are easier to work with when it comes to time, But I was wondering How to set a cookie for 24 hours... it's so if a member rated another member it would only allow one rating Per 24 hours...[/quote]you cannt do this rating system with cookies or sessions... coz users will remove cookies and sessions, then they will rate....so do it with ip filtering tech...like...1. After getting one rate... store $_SERVER['remote_addr']; /* getting user's ip address */ in a database table, with the current date...how can you filter users?1. once a user entering in rating system... get his remote addr2. check for its entry in table for today3. if {yes} >> Sorry you cannt rate more than once per day4. if {no} >> allow him to rate... and store his ip in tableDis advantage...1. Once a user is having dynamic ip address... then this tech wont give 100% proof.Thank you,Karthi Keyan. Quote Link to comment Share on other sites More sharing options...
xyn Posted July 2, 2006 Author Share Posted July 2, 2006 Yeah that's what i was thinking about, and the Dynamic ip was the one thing that made me think of cookies.. and again as you say about the cookie/session.I'll have ago on the ip filter. Quote Link to comment Share on other sites More sharing options...
karthikeyan_coder Posted July 2, 2006 Share Posted July 2, 2006 [quote author=xyn link=topic=99227.msg390717#msg390717 date=1151873958]Yeah that's what i was thinking about, and the Dynamic ip was the one thing that made me think of cookies.. and again as you say about the cookie/session.I'll have ago on the ip filter.[/quote]okay... i have one more idea about ip filtering... thats... once a user is having a dynamic ip then we can sense their ip range... like 34.43.232.3 34.43.54.76 34.43.xxx.xxx 34.43.xxx.xxxso last blocks will be changed while they got new ip address... so we can check the first two blocks with some time intervels... once you cared about dynamic ip people then try to apply this idea...Thank you,Karthi keyan. Quote Link to comment Share on other sites More sharing options...
corbin Posted July 2, 2006 Share Posted July 2, 2006 AOL has millions of users with dynamic IP addresses... what if someone has 555.555.55.1 and a different person has 555.555.55.2? Quote Link to comment Share on other sites More sharing options...
karthikeyan_coder Posted July 2, 2006 Share Posted July 2, 2006 [quote author=corbin link=topic=99227.msg390727#msg390727 date=1151874855]AOL has millions of users with dynamic IP addresses... what if someone has 555.555.55.1 and a different person has 555.555.55.2?[/quote]LOL ... so what will be a better solution? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.