Jump to content

Storing sessions


pedjasmek

Recommended Posts

I use a log table for vistors/members. It stores their IP address and a 'large' random string.

 

this string is also present in a client side cookie (if they accept cookies!) whne they return to the site and have this cookie I check that their IP address matches the last one they visited based on this string - if so its fairly certain to be that person - if not make them login again...

Link to comment
https://forums.phpfreaks.com/topic/76052-storing-sessions/#findComment-384987
Share on other sites

I wouldn't say Most users, but I would say a good 20-30% would have their ip address change each time.  But I think you missed his point.  Even if it doesn't match, the worse case scenario is they have to re-log in.

 

You can skip that part and only require cookies, it's entirely up to you.

 

But most of the users have dynamic IP addresses so how can you have a match when the IP address is different each time a user is online?

Link to comment
https://forums.phpfreaks.com/topic/76052-storing-sessions/#findComment-385056
Share on other sites

Archived

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

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