views:

45

answers:

1

hi

i want to set the cookie before the login lik:if the user fails to login by typing wrong user id or password in 15 minutes then he should be restricted for the nest 15 minutes to login..

using Javascript i have set a cookie i want that if the user has exceeded 15 minutes from his first trail then he should recieve an alert or message on window(just like gmail or yahoo)

any example help please its urgent

+1  A: 

store the user machines IP and a boolean field- to allow,--> in Database. retreive it and restrict them.(just Logic).

pvaju896
i dint get? please provide some example i am new to javascript
mayuri
pvaju896
You wouldn't do this in JavaScript. This would be done on the server side. You don't want to rely on cookies either, they can forged/deleted.
George Marian
how to retrive the machines ip and store it?
mayuri
thanks ur help..
mayuri
@mayuri What programming language are you using on the server side?
George Marian
Could be a pain for users on large networks sharing a single public IP, but I suppose it's a better option then trusting the client to store it in a cookie.
Lèse majesté