Jump to content

Archived

This topic is now archived and is closed to further replies.

xyn

24 hour Cookie / Session

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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
[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?

Share this post


Link to post
Share on other sites

×

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.