Jump to content


Photo

24 hour Cookie / Session


  • Please log in to reply
5 replies to this topic

#1 xyn

xyn
  • Members
  • PipPipPip
  • Advanced Member
  • 779 posts
  • LocationNorthampton

Posted 02 July 2006 - 08:37 PM

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...

#2 karthikeyan_coder

karthikeyan_coder
  • Members
  • PipPipPip
  • Advanced Member
  • 201 posts

Posted 02 July 2006 - 08:55 PM

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...


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 addr
2. check for its entry in table for today
3. if {yes} >> Sorry you cannt rate more than once per day
4. if {no} >> allow him to rate... and store his ip in table


Dis advantage...
1. Once a user is having dynamic ip address... then this tech wont give 100% proof.

Thank you,
Karthi Keyan.
www.karthi.us

#3 xyn

xyn
  • Members
  • PipPipPip
  • Advanced Member
  • 779 posts
  • LocationNorthampton

Posted 02 July 2006 - 08:59 PM

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.

#4 karthikeyan_coder

karthikeyan_coder
  • Members
  • PipPipPip
  • Advanced Member
  • 201 posts

Posted 02 July 2006 - 09:11 PM

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.


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.xxx
so 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.
www.karthi.us

#5 corbin

corbin
  • Staff Alumni
  • Advanced Member
  • 8,129 posts

Posted 02 July 2006 - 09:14 PM

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?
Why doesn't anyone ever say hi, hey, or whad up world?

#6 karthikeyan_coder

karthikeyan_coder
  • Members
  • PipPipPip
  • Advanced Member
  • 201 posts

Posted 02 July 2006 - 09:32 PM

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?


LOL ... so what will be a better solution?
www.karthi.us




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users