NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Robert Iliuta on July 29, 2010, 10:31:29 PM
-
Hallo,
How can I get the User-Agent info ? like bellow
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8
Thank you,
Robert
-
Robert,
The web handler's "_useragent" property contains that information.
Larry Sand
-
Hallo Larry,
I found that property too, but don't know how to use it... and where to put the code...
Thank you,
Robert
-
use it wherever you need to. I guess where depends on what you're doing with it.
as to "how"...
str = p_web._UserAgent
Cheers
Bruce
-
Hallo Bruce,
I always got compile error: Syntax error: Field not found: _USERAGENT
Robert
-
what build are you using?
-
Version 4.49
-
Hallo Bruce,
Any news ?
Thank you,
Robert
-
ah - you may want to mention the version you have with your posts. The _UserAgent property is in version 5.
you'll need to do this;
xxx = p_web.GetHeaderField('User-Agent:')
cheers
Bruce
-
Hallo Bruce,
Works perfect!
Thanks