Jump to content

24 hour Cookie / Session


xyn

Recommended Posts

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...
Link to comment
Share on other sites

[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 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.
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

[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.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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.