Jump to content

How would I make it so a user can only access a certain page 3 times?


jdock1

Recommended Posts

For one of my javascript/php scripts , I have a demo up & I do not want people taking advantage of the demo and using it all the time.

 

How could I make it so the user can only access the page 3 times in a 24 hour period??

 

I couldnt think of anything

without forcing the user to register there is little you can do to prevent it.  You can:

- set a cookie and look for it, hope the user doesn't delete it

- grab and store IP address and compare it with request, hope the user doesn't go through a proxy or there aren't multiple users on the same network

 

with a login system:

- real easy to enforce it on the account, but you are basically back to the above as far as users signing up with multiple accounts

 

yaay im finally back home ! lol

You Could create a cookie that lets him access the page only 3 times in 24 hours but sadly idk how to help you with a script

 

or to dont allow access a specified IP To load the page only 3 times again idk how to do it

without forcing the user to register there is little you can do to prevent it.  You can:

- set a cookie and look for it, hope the user doesn't delete it

- grab and store IP address and compare it with request, hope the user doesn't go through a proxy or there aren't multiple users on the same network

with a login system:

- real easy to enforce it on the account, but you are basically back to the above as far as users signing up with multiple accounts

 

Thanks bud, I just didnt really know how to implement that... I cant believe I didnt think of that earlier. I got it working by storing the IP address in a database and matching it

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.