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

Link to comment
Share on other sites

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.

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.