Thanks a lot Steven!

The following code worked like a charm!

******************
agent = os.environ['HTTP_USER_AGENT']

# determination of user browser
agent = agent.lower()
if 'chrome' in agent:
        agent = 'Chrome'
if 'firefox' in agent:
        agent = 'Firefox'
if 'opera' in agent:
        agent = 'Opera'
if 'safari' in agent:
        agent = 'Safari'
if 'msie' in agent:
        agent = 'IE'
***************

I just want to have an idea of what browser a guest is using when
hitting my webpage.

http://www.superhost.gr/?show=log

now includes also that filed in the logging process.

But if i wanted the OS also?

sys.platform is for retrieving the host OS type that the script is
running and not the guest OS type.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to