Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cookie script

Status
Not open for further replies.

scorpion975

IS-IT--Management
Jul 26, 2004
10
US
ANy suggestions, i want a cookie script to work with a cgi script, i need it to see that every time a user signs on, it will record time on and put it into a file, once user reaches time period it will not let you back on. Need it to expire by hours, example:

username: mholyfield = 10 hours
username: mjackson = 5 hours

any thoughts
 
You can't reliably keep a user out like this becaue the browser does not maintain a two-way (synchronous) connection with the server and javascript is primarily a client-side scripting language. Your best bet is probably going to be using session variables and a server-side scripting language.

But regardless of what you do, you're going to have the problem of people logging in and not properly logging out which will only server to give you erroneous "logged on" times.

There's always a better way. The fun is trying to find it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top