The API documentation (http://webpy.org/docs/0.3/api) hints at how to do this, search for user-agent on that page. To get a look at all the environment vars try just returning web.ctx.env class index: def GET(self): return web.ctx.env
On Jan 23, 4:54 pm, haskellian <[email protected]> wrote: > * How can I check which browser the user has? web.ctx.env['HTTP_USER_AGENT'] > * How can I check his IP-number? web.ctx.env['REMOTE_ADDR'] > * How do I block an IP if it is trying to login more than say 10 times > or trying to attack the site? Attack and failed login are very different. DDoS sorts of things are more of a server problem than an app problem. Failed login is more of an app problem - most simplistically (though easy to defeat) you could just add a login attempts var to your session. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
