Jump to content

30 day timeout


MarcP

Recommended Posts

Good morning everyone :) I'm new to this forum and new to js and from what i've seen you people are wonderful.I've created some software and I'm trying to have it so that it will be fully functional for 30 days and then after that an alert box will pop up explaining that their time has expired. After the user clicks the "ok" button they will be redirected toa web page.I've tried the myDate function with no luckAny ideas??

Link to comment
Share on other sites

Just add a cookie that expires in 30 days, then have the script check for it:p Have the cookies name and value encrypted so that the user cant cheat and make another one though...lol
I'm guessing you're going to need some server-side code to accomplish this. If the encryption algorithm is done in javascript, anyone with a passing knowledge of javascript will be able to crack it.
Link to comment
Share on other sites

I'm guessing you're going to need some server-side code to accomplish this. If the encryption algorithm is done in javascript, anyone with a passing knowledge of javascript will be able to crack it.
Yes, but thats why you create two encryption functions that need keys to operate :) The keys are stored in a small database, then accessed via AJAX and used to decrypt the cookie and eval the main function :)Each encryption has a different key used to decrypt it :)
Link to comment
Share on other sites

Yes, but thats why you create two encryption functions that need keys to operate :) The keys are stored in a small database, then accessed via AJAX and used to decrypt the cookie and eval the main function :)Each encryption has a different key used to decrypt it :)
Ah, but to get the value from the database, you'll need server-side technologies - even using AJAX.
Link to comment
Share on other sites

Ah, but to get the value from the database, you'll need server-side technologies - even using AJAX.
Then use something other than a database :) Such as FF's globalStorage and IE's userData. Or you could have a webpage with keys and values that are auto-generated according to the user's persistent data value :)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...