NetTalk Central
Toggle navigation
Login
Register
×
Welcome,Guest
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
Get the User-Agent info
« previous
next »
Print
Pages: [
1
]
Author
Topic: Get the User-Agent info (Read 5905 times)
Robert Iliuta
Sr. Member
Posts: 472
Get the User-Agent info
«
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
Logged
Larry Sand
Full Member
Posts: 101
Re: Get the User-Agent info
«
Reply #1 on:
July 30, 2010, 06:32:20 AM »
Robert,
The web handler's "_useragent" property contains that information.
Larry Sand
Logged
Robert Iliuta
Sr. Member
Posts: 472
Re: Get the User-Agent info
«
Reply #2 on:
August 02, 2010, 10:34:31 AM »
Hallo Larry,
I found that property too, but don't know how to use it... and where to put the code...
Thank you,
Robert
Logged
Bruce
Global Moderator
Hero Member
Posts: 11250
Re: Get the User-Agent info
«
Reply #3 on:
August 03, 2010, 07:25:41 AM »
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
Logged
Robert Iliuta
Sr. Member
Posts: 472
Re: Get the User-Agent info
«
Reply #4 on:
August 03, 2010, 10:07:12 PM »
Hallo Bruce,
I always got compile error: Syntax error: Field not found: _USERAGENT
Robert
Logged
Bruce
Global Moderator
Hero Member
Posts: 11250
Re: Get the User-Agent info
«
Reply #5 on:
August 04, 2010, 05:40:38 AM »
what build are you using?
Logged
Robert Iliuta
Sr. Member
Posts: 472
Re: Get the User-Agent info
«
Reply #6 on:
August 04, 2010, 06:23:58 AM »
Version 4.49
Logged
Robert Iliuta
Sr. Member
Posts: 472
Re: Get the User-Agent info
«
Reply #7 on:
August 10, 2010, 07:51:31 AM »
Hallo Bruce,
Any news ?
Thank you,
Robert
Logged
Bruce
Global Moderator
Hero Member
Posts: 11250
Re: Get the User-Agent info
«
Reply #8 on:
August 10, 2010, 08:09:21 PM »
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
Logged
Robert Iliuta
Sr. Member
Posts: 472
Re: Get the User-Agent info
«
Reply #9 on:
August 15, 2010, 04:11:26 AM »
Hallo Bruce,
Works perfect!
Thanks
Logged
Print
Pages: [
1
]
« previous
next »
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
Get the User-Agent info