Reputation: 132
i want to receve a get request from user and respond a picture with number in it to that user. and then receve number in the picture from user and if the number true send back some data to that user. and i dont want to use CAPCHA services. how can i handle request and respond with expressjs?
Upvotes: 0
Views: 49
Reputation: 707786
Here would be the basic steps:
req.session
object and also checks to see if the current server time is close enough to the time/date in the session so the previous data has not yet expired. If both tests pass, then client has appropriately submitted the number in the picture and you can set a flag in req.session
that indicates this client has passed. If both tests don't pass, then you clear the number and date/time in req.session
and send a response that indicates failure.Upvotes: 1