Jump to content

Limited Guest Access - Help


brooksh

Recommended Posts

I am trying to figure out how to setup cookies so that you can only view certain pages a few times, but then it will take you to a registration page. And if you hit refresh or back it will take you to a second registration page.

 

I want to be able to allow a new visitor access for a limited time, but then force registration. Does anyone know how to accomplish this?

Link to comment
https://forums.phpfreaks.com/topic/214150-limited-guest-access-help/
Share on other sites

log session_id's and ip addresses along with date/time would be a good way. then you could just have some code to check if the time is beyond the allotted time you have in mind (say, 5 minutes). Then if it's past that time, automatically forward to the registration page.

yeah sessions would be better than cookies, but like cookies sessions can be destroyed.

another way could be to log the ip address in a database with a start time and end time. Ones the end time is past you can deny access or something or let them redirect to a register page. But if someone wants he can of course spoof it's IP. but that's all that is possible with guests I think. You can do more with registered people ofc.

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.