Author |
Topic |
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 08 November 2011 : 13:19:00
|
In the fUserAgent(ua) function, need to change the lines for Windows 7 since MS gave Windows Server 2008 identical version numbers. This will fix that and add the code for Windows 8.
Also, to add browser detection for Comodo Dragon, add these to that portion of the code:
|
Edited by - Carefree on 08 November 2011 13:49:17 |
|
golfmann
Junior Member
United States
450 Posts |
Posted - 08 November 2011 : 17:27:38
|
Thanks |
Edited by - golfmann on 08 November 2011 17:27:54 |
|
|
AHMEDHHH1
Junior Member
Egypt
105 Posts |
Posted - 09 November 2011 : 16:07:31
|
Thanks Professor Carefree |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 09 November 2012 : 08:15:06
|
OK - Here's a couple of changes for IE 9/10 & Firefox. I'll get Windows 2012 Server soon.
Here's the IE group:
ElseIf instr(ua, "MSIE 10") Then
strBrowser = "Microsoft IE 10"
ElseIf instr(ua, "MSIE 9") Then
strBrowser = "Microsoft IE 9"
ElseIf instr(ua, "MSIE 8") Then
strBrowser = "Microsoft IE 8"
ElseIf (instr(ua, "MSIE 7") or mid(ua,26,6)="MSIE 7") Then
strBrowser = "Microsoft IE 7"
if right(ua, 12) = "MS-RTC LM 8)" then
strBrowser = "Microsoft IE 8"
end if
ElseIf instr(ua, "MSIE 6") Then
strBrowser = "Microsoft IE 6"
ElseIf instr(ua, "MSIE 5") Then
strBrowser = "Microsoft IE 5"
ElseIf instr(ua, "MSIE 4") Then
strBrowser = "Microsoft IE 4"
ElseIf instr(ua, "MSIE 3") Then
strBrowser = "Microsoft IE 3"
ElseIf instr(ua, "MSIE 2") Then
strBrowser = "Microsoft IE 2"
ElseIf instr(ua, "MSIE 1") Then
strBrowser = "Microsoft IE 1"
For Firefox, a tiny change (it was truncating the sub-version):
ElseIf (instr(ua, "Firefox") AND instr(ua, "Gecko")) or (mid(ua,len(ua)-13,7)="FireFox") Then
strBrowser = "Mozilla Firefox "
for x = 1 to len(ua)-8
if mid(ua,x,8)="Firefox/" then
strBrowser = "Firefox " & mid(ua,x+8)
end if
next
|
|
|
Giumer
Junior Member
Italy
163 Posts |
Posted - 11 November 2012 : 00:42:04
|
hi mate plz me file :
|
======================= http://www.Giumer.it/forum
======================= |
Edited by - Giumer on 11 November 2012 02:28:46 |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 11 November 2012 : 01:36:59
|
Entire function:
function fUserAgent(ua)
ua = Request.ServerVariables("HTTP_USER_AGENT")
If instr(ua, "aardvark") Then
strBrowser = "Aardvark Bot"
ElseIf instr(ua, "Abacho") Then
strBrowser = "Abacho Bot"
ElseIf instr(ua, "About") Then
strBrowser = "About Bot"
ElseIf instr(ua, "Accelatech") Then
strBrowser = "Accelatech Bot"
ElseIf instr(ua, "accoon") or instr(ua, "Accoon") Then
strBrowser = "Accona Bot"
ElseIf instr(ua, "AESOP") Then
strBrowser = "Aesop Bot"
ElseIf instr(ua, "aipbot") Then
strBrowser = "AIP Bot"
ElseIf instr(ua, "Aladin") Then
strBrowser = "Aladin"
ElseIf instr(ua, "ia_archiver") Then
strBrowser = "Alexa"
ElseIf instr(ua, "Alkaline") Then
strBrowser = "Alkaline Bot"
ElseIf instr(ua, "crawler@fast") or instr(ua, "FAST-WebCrawler") Then
strBrowser = "AllTheWeb"
ElseIf instr(ua, "Mercator") or instr(ua, "Scooter") Then
strBrowser = "Altavista"
ElseIf instr(ua, "Amaya") Then
strBrowser = "Amaya"
ElseIf instr(ua, "Amfibi") or instr(ua, "amibot") Then
strBrowser = "AmFib Bot"
ElseIf instr(ua, "Amniga") Then
strBrowser = "Amiga"
ElseIf instr(ua, "amzn") Then
strBrowser = "Amazon Bot"
ElseIf instr(ua, "AnnoMille") Then
strBrowser = "Anno Mille Bot"
ElseIf instr(ua, "Chase") Then
strBrowser = "Answer Chase"
ElseIf instr(ua, "Anzwers") Then
strBrowser = "Anzwers Bot"
ElseIf instr(ua, "AOL 3") Then
strBrowser = "AOL 3"
ElseIf instr(ua, "AOL 4") Then
strBrowser = "AOL 4"
ElseIf instr(ua, "AOL 5") Then
strBrowser = "AOL 5"
ElseIf instr(ua, "AOL 6") Then
strBrowser = "AOL 6"
ElseIf instr(ua, "AOL 7") Then
strBrowser = "AOL 7"
ElseIf instr(ua, "AOL 8") Then
strBrowser = "AOL 8"
ElseIf instr(ua, "AOL 9") Then
strBrowser = "AOL 9"
ElseIf instr(ua, "AOL") Then
strBrowser = "AOL"
ElseIf instr(ua, "Apexoo") Then
strBrowser = "Apexoo Bot"
ElseIf instr(ua, "Aport") Then
strBrowser = "Aport Bot"
ElseIf instr(ua, "appie") Then
strBrowser = "Appie Bot"
ElseIf instr(ua, "Araby") Then
strBrowser = "Araby Bot"
ElseIf instr(ua, "Arach") Then
strBrowser = "Arach No Idea"
ElseIf instr(ua, "aranhabot") Then
strBrowser = "Aranha Bot"
ElseIf instr(ua, "archive") Then
strBrowser = "Archive Org"
ElseIf instr(ua, "Argus") Then
strBrowser = "Argus"
ElseIf instr(ua, "arianna.libero.it") Then
strBrowser = "Arianna/Libero"
ElseIf instr(ua, "Arikus") Then
strBrowser = "Arikus Bot"
ElseIf instr(ua, "Arquivo") Then
strBrowser = "Arquivo Crawler"
ElseIf instr(ua, "ASAHA") Then
strBrowser = "Asaha TU"
ElseIf instr(ua, "Ask.24") or instr(ua, "AskAbout") Then
strBrowser = "Ask About"
ElseIf instr(ua, "asked/Nutch") Then
strBrowser = "Asked Bot"
ElseIf instr(ua, "Jeeves") Then
strBrowser = "Ask Jeeves"
ElseIf instr(ua, "ASPSeek") Then
strBrowser = "ASP Seek"
ElseIf instr(ua, "Camino") or instr(ua, "Chimera") Then
strBrowser = "Camino"
ElseIf instr(ua, "Chrome") Then
If instr(ua,"RockMelt") Then
strBrowser = "RockMelt"
strVersion=""
for i = 1 to len(ua)
if mid(ua,i,9)="RockMelt/" Then
j=i+9
Do while not mid(ua,j,1)=" "
strVersion=strVersion&mid(ua,j,1)
j=j+1
Loop
End If
next
strBrowser=strBrowser&" "&strVersion
Else
strBrowser = "Chrome"
End If
ElseIf instr(ua, "Crawler") Then
strBrowser = "Crawler DE"
ElseIf instr(ua, "Dillo") Then
strBrowser = "Dillo"
ElseIf instr(ua, "Robozilla") Then
strBrowser = "DMOZ"
ElseIf instr(ua, "DocZilla") Then
strBrowser = "DocZilla"
ElseIf instr(ua, "NPBot") Then
strBrowser = "Domain Researcher Bot"
ElseIf instr(ua, "Dreamcast") Then
strBrowser = "Dreamcast"
ElseIf instr(ua, "Speedy+Spider") Then
strBrowser = "EntireWeb"
ElseIf instr(ua, "Epiphany") Then
strBrowser = "Epiphany"
ElseIf instr(ua, "EudoraWeb") Then
strBrowser = "Eudora Web"
ElseIf instr(ua, "MuscatFerret") Then
strBrowser = "EuroFerret"
ElseIf instr(ua, "exactseek") Then
strBrowser = "ExactSeek"
ElseIf instr(ua, "Architext") Then
strBrowser = "Excite"
ElseIf instr(ua, "Fireball") Then
strBrowser = "Fireball DE"
ElseIf instr(ua, "Flock") Then
strBrowser = "Flock"
ElseIf instr(ua, "Galeon") Then
strBrowser = "Galeon"
ElseIf instr(ua, "Gigabot") Then
strBrowser = "Gigabot"
ElseIf instr(ua, "Moget") Then
strBrowser = "Goo JP"
ElseIf instr(ua, "Googlebot") Then
strBrowser = "Googlebot"
ElseIf instr(ua, "Mediapartners") Then
strBrowser = "Google Adsense"
ElseIf instr(ua, "Google CHTML") Then
strBrowser = "Google Proxy Server"
ElseIf instr(ua, "Sun") AND instr(ua, "Mozilla/3") Then
strBrowser = "HotJava"
ElseIf instr(ua, "iCab") Then
strBrowser = "iCab"
ElseIf instr(ua, "ICE") Then
strBrowser = "ICE"
ElseIf instr(ua, "Infoseek") or instr(ua, "Ultraseek") Then
strBrowser = "Infoseek"
ElseIf instr(ua, "slurp") or instr(ua, "Slurp") Then
strBrowser = "Inktomi"
ElseIf instr(ua, "internetseer") or instr(ua, "Internetseer") Then
strBrowser = "InternetSeer"
ElseIf instr(ua, "Jetbot") Then
strBrowser = "Jetbot"
ElseIf instr(ua, "Konqueror") Then
strBrowser = "Konqueror"
ElseIf instr(ua, "Mantra") or instr(ua, "ZyBorg") Then
strBrowser = "Look Smart"
ElseIf instr(ua, "Lycos") Then
strBrowser = "Lycos"
ElseIf instr(ua, "Lynx") Then
strBrowser = "Lynx"
ElseIf instr(ua, "MSIE 10") Then
strBrowser = "Microsoft IE 10"
ElseIf instr(ua, "MSIE 9") Then
strBrowser = "Microsoft IE 9"
ElseIf instr(ua, "MSIE 8") Then
strBrowser = "Microsoft IE 8"
ElseIf (instr(ua, "MSIE 7") or mid(ua,26,6)="MSIE 7") Then
strBrowser = "Microsoft IE 7"
if right(ua, 12) = "MS-RTC LM 8)" then
strBrowser = "Microsoft IE 8"
end if
ElseIf instr(ua, "MSIE 6") Then
strBrowser = "Microsoft IE 6"
ElseIf instr(ua, "MSIE 5") Then
strBrowser = "Microsoft IE 5"
ElseIf instr(ua, "MSIE 4") Then
strBrowser = "Microsoft IE 4"
ElseIf instr(ua, "MSIE 3") Then
strBrowser = "Microsoft IE 3"
ElseIf instr(ua, "MSIE 2") Then
strBrowser = "Microsoft IE 2"
ElseIf instr(ua, "MSIE 1") Then
strBrowser = "Microsoft IE 1"
ElseIf instr(ua, "Gecko") AND instr(ua, "Netscape") AND instr(ua, "rv:0") Then
strBrowser = "Mozilla"
ElseIf instr(ua, "Gecko") AND instr(ua, "Netscape") AND instr(ua, "rv:1") Then
strBrowser = "Mozilla 1"
ElseIf instr(ua, "Gecko") AND instr(ua, "Netscape") AND instr(ua, "rv:2") Then
strBrowser = "Mozilla 2"
ElseIf instr(ua, "Firebird") AND instr(ua, "Gecko") Then
strBrowser = "Mozilla Firebird"
ElseIf (instr(ua, "Firefox") AND instr(ua, "Gecko")) or (mid(ua,len(ua)-13,7)="FireFox") Then
strBrowser = "Mozilla Firefox "
for x = 1 to len(ua)-8
if mid(ua,x,8)="Firefox/" then
strBrowser = "Firefox " & mid(ua,x+8)
end if
next
ElseIf instr(ua, "msnbot") Then
strBrowser = "MSN"
ElseIf instr(ua, "My agent") Then
strBrowser = "My Agent"
ElseIf instr(ua, "NameProtect") Then
strBrowser = "NameProtect"
ElseIf instr(ua, "NetCaptor") Then
strBrowser = "Net Captor"
ElseIf instr(ua, "Mozilla/1") Then
strBrowser = "Netscape 1"
ElseIf instr(ua, "Mozilla/2") Then
strBrowser = "Netscape 2"
ElseIf instr(ua, "Mozilla/3") Then
strBrowser = "Netscape 3"
ElseIf instr(ua, "Mozilla/4") Then
strBrowser = "Netscape 4"
ElseIf instr(ua, "Mozilla/5") Then
strBrowser = "Netscape 5"
ElseIf instr(ua, "Netscape/6") Then
strBrowser = "Netscape 6"
ElseIf instr(ua, "Netscape/7") Then
strBrowser = "Netscape 7"
ElseIf instr(ua, "Netscape/8") Then
strBrowser = "Netscape 8"
ElseIf instr(ua, "Gulliver") Then
strBrowser = "Northernlight"
ElseIf instr(ua, "Opera") Then
strBrowser = "Opera"
ElseIf instr(ua, "Opera 1") Then
strBrowser = "Opera 1"
ElseIf instr(ua, "Opera 2") Then
strBrowser = "Opera 2"
ElseIf instr(ua, "Opera 3") Then
strBrowser = "Opera 3"
ElseIf instr(ua, "Opera 4") Then
strBrowser = "Opera 4"
ElseIf instr(ua, "Opera 5") Then
strBrowser = "Opera 5"
ElseIf instr(ua, "Opera 6") Then
strBrowser = "Opera 6"
ElseIf instr(ua, "Opera 7") Then
strBrowser = "Opera 7"
ElseIf instr(ua, "Opera 8") Then
strBrowser = "Opera 8"
ElseIf instr(ua, "PhpDig") Then
strBrowser = "PhpDig"
ElseIf instr(ua, "MSPIE 1") Then
strBrowser = "Pocket IE 1"
ElseIf instr(ua, "MSPIE 2") Then
strBrowser = "Pocket IE 2"
ElseIf instr(ua, "Microsoft URL Control") Then
strBrowser = "Possible EMail Collector"
ElseIf instr(ua, "StackRambler") Then
strBrowser = "Rambler"
ElseIf instr(ua, "Robozilla") Then
strBrowser = "Robozilla"
ElseIf instr(ua, "Safari") Then
strBrowser = "Safari"
ElseIf instr(ua, "SeaMonkey") Then
strBrowser = "Sea Monkey"
ElseIf instr(ua, "Fluffy") Then
strBrowser = "Search Hippo"
ElseIf instr(ua, "Teoma") Then
strBrowser = "Teoma"
ElseIf instr(ua, "T-H-U-N-D-E3-R-S-T-O-N-E") Then
strBrowser = "Thunderstone"
ElseIf instr(ua, "TurnitinBot") Then
strBrowser = "Turnitin"
ElseIf instr(ua, "UbiCrawler") Then
strBrowser = "UbiCrawler"
ElseIf instr(ua, "Voilabot") Then
strBrowser = "Voila FR"
ElseIf instr(ua, "W3C_Validator") Then
strBrowser = "W3C Validator"
ElseIf instr(ua, "WebCrawler") Then
strBrowser = "WebCrawler"
ElseIf instr(ua, "wombat") Then
strBrowser = "Web Wombat"
ElseIf instr(ua, "Zyborg") Then
strBrowser = "Wisenut"
ElseIf instr(ua, "Yahoo") Then
strBrowser = "Yahoo"
Else
strBrowser = "Unknown"
End If
GetBrowser = strBrowser
If instr(ua, "Amiga") Then
strSystem = "Amiga"
ElseIf instr(ua, "AOLTV") or instr(ua, "AOL_TV") Then
strSystem = "AOL TV"
ElseIf instr(ua, "BSD") or instr(ua, "FreeBSD") Then
strSystem = "Free BSD"
ElseIf instr(ua, "Linux") Then
strSystem = "Linux"
ElseIf instr(ua, "68000") or instr(ua, "68k") AND instr(ua, "Mac") Then
strSystem = "Mac 68k"
ElseIf instr(ua, "Mac OS X") Then
strSystem = "Mac OS X"
ElseIf instr(ua, "Mac_PowerPC") or instr(ua, "PPC") Then
strSystem = "Mac PowerPC"
ElseIf instr(ua, "Mac") or (instr(ua, "Apple") and not instr(ua, "AppleWebKit")) Then
strSystem = "MacLngosh"
ElseIf instr(ua, "Nokia") Then
strSystem = "Nokia"
ElseIf instr(ua, "OS/2") Then
strSystem = "OS/2"
ElseIf instr(ua, "PalmOS") Then
strSystem = "Palm OS"
ElseIf instr(ua, "Elaine") Then
strSystem = "PalmPilot"
ElseIf instr(ua, "Solaris") Then
strSystem = "Solaris"
ElseIf instr(ua, "SunOS") Then
strSystem = "Sun OS"
ElseIf instr(ua, "Unix") or instr(ua, "X11") Then
strSystem = "Unix"
ElseIf instr(ua, "WebTV") Then
strSystem = "Web TV"
ElseIf instr(ua, "NT 6.2") or instr(ua, "Windows 8") then
strSystem = "Windows 8"
ElseIf instr(ua, "NT 6.1") or instr(ua, "Windows 7") then
strSystem = "Windows 7"
ElseIf instr(ua, "NT 6.0") or instr(ua, "Windows Vista") then
strSystem = "Windows Vista"
ElseIf instr(ua, "NT 5.2") or instr(ua, "Windows 2003") Then
strSystem = "Windows 2003"
ElseIf instr(ua, "NT 5.1") or instr(ua, "Windows XP") Then
strSystem = "Windows XP"
ElseIf instr(ua, "NT 5.0") or instr(ua, "Windows 2000") Then
strSystem = "Windows 2000"
ElseIf instr(ua, "NT 4.0") or instr(ua, "Windows NT") or instr(ua, "WinNT") Then
strSystem = "Windows NT 4"
ElseIf instr(ua, "Windows 3.1") or instr(ua, "Win16") Then
strSystem = "Windows 3.x"
ElseIf instr(ua, "Windows 95") or instr(ua, "Win95") Then
strSystem = "Windows 95"
ElseIf instr(ua, "Windows 98") or instr(ua, "Win98") Then
strSystem = "Windows 98"
ElseIf instr(ua, "Windows CE") Then
strSystem = "Windows CE"
ElseIf instr(ua, "Windows ME") or instr(ua, "Win 9x 4.90") Then
strSystem = "Windows ME"
Else
strSystem = "Unknown"
End If
GetOS = strSystem
fUserAgent = GetOS & "<br/>" & GetBrowser
End Function
|
Edited by - Carefree on 11 November 2012 02:05:38 |
|
|
Giumer
Junior Member
Italy
163 Posts |
Posted - 11 November 2012 : 02:04:25
|
sorry but I do not understand how to enter the code! I have to change my file that also part of the language. quiesto and part of my code
function fUserAgent(ua)
Dim UAgent
UAgent = ua
' more info in: http://www.zytrax.com/tech/web/browser_ids.htm
if instr(UAgent, "Opera") then
aBrowser = split(UAgent, " ")
strBrowser = replace(aBrowser(0), "/", " ")
elseif instr(UAgent, "Netscape") then
strBrowser = replace(mid( UAgent, inStr(UAgent, "Netscape")), "/", " " )
ElseIf instr(ua, "MSIE 9") Then
strBrowser = "Microsoft IE 9"
elseif instr(UAgent, "MSIE") then
strBrowser = replace(mid( UAgent, inStr(UAgent, "MSIE"), 8), "MSIE", "Microsoft " )
elseif instr(UAgent, "Flock") then
strBrowser = replace(mid(UAgent, instr(UAgent, "Flock")), "/", " ")
elseif instr(UAgent, "SeaMonkey") then
strBrowser = replace(mid(UAgent, instr(UAgent, "SeaMonkey")), "/", " ")
elseif instr(UAgent, "Firefox") then
strBrowser = replace(mid(UAgent, instr(UAgent, "Firefox")), "/", " ")
elseif instr(UAgent, "Mozilla") and instr(UAgent, "compatible") = 0 then
if instr(UAgent, "Netscape8") then
strBrowser = "Netscape 8.x"
elseif instr(UAgent, "Netscape7") then
strBrowser = "Netscape 7.x"
elseif instr(UAgent, "Netscape6") then
strBrowser = "Netscape 6.x"
ElseIf instr(strUserAgent, "Mozilla/5") Then
strBrowser = "Netscape 5"
elseif instr(UAgent, "Mozilla/4") then
strBrowser = "Netscape Navigator 4.x"
elseif instr(UAgent, "Mozilla/3") then
strBrowser = "Netscape Navigator 3.x"
elseif instr(UAgent, "Netscape") then
strBrowser = "Netscape"
else
if instr(UAgent, "Mozilla/5") then
strBrowser = Mid(UAgent, instr(UAgent, "rv:")+3)
strBrowser = Mid(strBrowser, 1, instr(strBrowser, ")"))
strBrowser = Mid(strBrowser, 1, Len(strBrowser)-1)
strBrowser = "Mozilla " & strBrowser
else
strBrowser = "Mozilla"
end if
end if
elseif instr(UAgent, "W3C_Validator") then
strBrowser = "W3C Validator"
elseif instr(UAgent, "Googlebot") then
strBrowser = "Googlebot"
else
strBrowser = "<em title=""Browser: " & UAgent & """>" & fLang("strLangInc_Active_Users00170") & "</em>"
end if
if instr(UAgent, "Ezooms") then strBrowser = "ezooms.bot@gmail.com"
if instr(UAgent, "ia_archiver") then strBrowser = "Alexa.Com"
if instr(UAgent, "Googlebot") then strBrowser = "Google"
if instr(UAgent, "My agent") then strBrowser = "My agent"
if instr(UAgent, "TeomaAgent") then strBrowser = "Teoma.Com"
if instr(UAgent, "Zyborg") then strBrowser = "Wisenut.Com"
if instr(UAgent, "Gulliver") then strBrowser = "NorthernLight.com"
if instr(UAgent, "Architext") then strBrowser = "Excite.com"
if instr(UAgent, "FAST-WebCrawler") then strBrowser = "AllTheWeb.com"
if instr(UAgent, "Slurp") then strBrowser = "Inktomi.com"
if instr(UAgent, "Jeeves") then strBrowser = "AskJeeves.com"
if instr(UAgent, "Scooter") then strBrowser = "AltaVista.com"
if instr(UAgent, "Mercator") then strBrowser = "AltaVista.com"
if instr(UAgent, "crawler@fast") then strBrowser = "AllTheWeb.com"
if instr(UAgent, "Crawler") then strBrowser = "Crawler.de"
if instr(UAgent, "InfoSeek") then strBrowser = "InfoSeek.com"
if instr(UAgent, "Lycos") then strBrowser = "Lycos.com"
if instr(UAgent, "Fluffy") then strBrowser = "SearchHippo.com"
if instr(UAgent, "Baiduspider") then strBrowser = "baidu.com"
if instr(UAgent, "Bingbot") then strBrowser = "bing.com"
if instr(UAgent, "crawler") then strBrowser = "brandwatch.net"
if instr(UAgent, "Ultraseek") then strBrowser = "InfoSeek.com"
if instr(UAgent, "MantraAgent") then strBrowser = "LookSmart.com"
if instr(UAgent, "Moget") then strBrowser = "Goo.jp"
if instr(UAgent, "T-H-U-N-D-E-R-S-T-O-N-E") then strBrowser = "Thunderstone.com"
if instr(UAgent, "MuscatFerret") then strBrowser = "Euroferret.com"
if instr(UAgent, "VoilaBot") then strBrowser = "Voila.fr"
if instr(UAgent, "Sleek Spider") then strBrowser = "Search-info.com"
if instr(UAgent, "KIT_Fireball") then strBrowser = "FireBall.de"
if instr(UAgent, "WebCrawler") then strBrowser = "Webcrawler.com"
if instr(UAgent, "wombat") then strBrowser = "Web Wombat"
if instr(UAgent, "Mediapartners-Google") then strBrowser = "Google AdSense"
if instr(UAgent, "Yahoo! Slurp") then strBrowser = "Yahoo"
if instr(UAgent, "NPBot") then strBrowser = "Domain Research Bot"
if instr(UAgent, "MSNBOT/0.1") then strBrowser = "MSN Search"
if instr(UAgent, "YahooFeedSeeker/") then strBrowser = "Yahoo Feed Seeker"
if instr(UAgent, "msnbot/0.1") then strBrowser = "MSN Search"
if instr(UAgent, "Speedy Spider") then strBrowser = "Entire Web"
if instr(UAgent, "ArchitextSpider") then strBrowser = "Excite"
if instr(UAgent, "ArchitectSpider") then strBrowser = "Excite"
if instr(UAgent, "Ask Jeeves/Teoma") then strBrowser = "Teoma"
if instr(UAgent, "msnbot/") then strBrowser = "MSN"
if instr(UAgent, "Lycos_Spider_(T-Rex)") then strBrowser = "Lycos"
if instr(UAgent, "Google CHTML Proxy/1.0") then strBrowser = "Google Proxy Server"
if instr(UAgent, "Microsoft URL Control") then strBrowser = "Possible Email Collector!!"
if instr(UAgent, "InternetSeer.com") then strBrowser = "Internet Seer"
if instr(UAgent, "Gigabot/") then strBrowser = "Gigabot"
if instr(UAgent, "Jetbot/1") then strBrowser = "Jetbot"
if instr(UAgent, "exactseek-pagereaper-") then strBrowser = "Exactseek"
if instr(UAgent, "YandexBot") then strBrowser = "Yandex"
if instr(UAgent, "Windows 95") or instr(UAgent, "Win95") then
strSystem = "Windows 95"
elseif instr(UAgent, "Win 9x 4.90") then
strSystem = "Windows ME"
elseif instr(UAgent, "Windows 98") or instr(UAgent, "Win98") then
strSystem = "Windows 98"
elseif instr(UAgent, "Windows 3.1") or instr(UAgent, "Win16") then
strSystem = "Windows 3.x/Windows NT 3.x"
elseif instr(UAgent, "NT 5.0") or instr(UAgent, "Windows 2000") then
strSystem = "Windows 2000"
elseif instr(UAgent, "NT 5.1") or instr(UAgent, "Windows XP") then
strSystem = "Windows XP"
elseif instr(UAgent, "NT 6.0") or instr(UAgent, "Windows Vista") then
strSystem = "Windows Vista"
ElseIf instr(UAgent, "NT 6.1") or instr(UAgent, "Windows 7") then
strSystem = "Windows 7"
ElseIf instr(UAgent, "Netscape 7") or instr(UAgent, "Mozilla 5.0") then
strSystem = "Mozilla 5.0"
elseif instr(UAgent, "NT") then
strSystem = "Windows NT"
elseif instr(UAgent, "Mac") then
strSystem = "Mac"
if instr(UAgent, "PowerPC") or instr(UAgent, "PPC") then
strSystem = "Mac PPC"
elseif instr(UAgent, "68000") or instr(UAgent, "68K") then
strSystem = "Mac 68K"
end if
elseif instr(UAgent, "Linux") then
strSystem = "Linux"
elseif instr(UAgent, "X11") then
strSystem = "UNIX"
elseif instr(UAgent, "W3C_Validator") then
strBrowser = "W3C Validator"
elseif instr(UAgent, "Googlebot") then
strSystem = "Googlebot"
else
strSystem = fLang("strLangInc_Active_Users00170")
end if
if strSystem =fLang("strLangInc_Active_Users00170") then strSystem = "Search Engine"
fUserAgent = strSystem & "<br />" & strBrowser
end function
|
======================= http://www.Giumer.it/forum
======================= |
Edited by - Giumer on 11 November 2012 02:29:19 |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 11 November 2012 : 02:18:44
|
quote: Originally posted by Giumer
sorry but I do not understand how to enter the code! I have to change my file that also part of the language. quiesto and part of my code
No problem, here's your code:
function fUserAgent(ua)
Dim UAgent
UAgent = ua
' more info in: http://www.zytrax.com/tech/web/browser_ids.htm
if instr(UAgent, "Opera") then
aBrowser = split(UAgent, " ")
strBrowser = replace(aBrowser(0), "/", " ")
elseif instr(UAgent, "Netscape") then
strBrowser = replace(mid( UAgent, inStr(UAgent, "Netscape")), "/", " " )
ElseIf instr(UAgent, "Chrome") Then
If instr(UAgent,"RockMelt") Then
strBrowser = "RockMelt"
strVersion=""
for i = 1 to len(UAgent)
if mid(UAgent,i,9)="RockMelt/" Then
j=i+9
Do while not mid(UAgent,j,1)=" "
strVersion=strVersion&mid(UAgent,j,1)
j=j+1
Loop
End If
next
strBrowser=strBrowser&" "&strVersion
Else
strBrowser = "Chrome"
End If
ElseIf instr(UAgent, "MSIE 10") Then
strBrowser = "Microsoft IE 10"
ElseIf instr(UAgent, "MSIE 9") Then
strBrowser = "Microsoft IE 9"
elseif instr(UAgent, "MSIE") then
strBrowser = replace(mid( UAgent, inStr(UAgent, "MSIE"), 8), "MSIE", "Microsoft " )
elseif instr(UAgent, "Flock") then
strBrowser = replace(mid(UAgent, instr(UAgent, "Flock")), "/", " ")
elseif instr(UAgent, "SeaMonkey") then
strBrowser = replace(mid(UAgent, instr(UAgent, "SeaMonkey")), "/", " ")
ElseIf (instr(UAgent, "Firefox") AND instr(UAgent, "Gecko")) or (mid(UAgent,len(UAgent)-13,7)="FireFox") Then
strBrowser = "Mozilla Firefox "
for x = 1 to len(UAgent)-8
if mid(UAgent,x,8)="Firefox/" then
strBrowser = "Firefox " & mid(UAgent,x+8)
end if
next
elseif instr(UAgent, "Mozilla") and instr(UAgent, "compatible") = 0 then
if instr(UAgent, "Netscape8") then
strBrowser = "Netscape 8.x"
elseif instr(UAgent, "Netscape7") then
strBrowser = "Netscape 7.x"
elseif instr(UAgent, "Netscape6") then
strBrowser = "Netscape 6.x"
ElseIf instr(strUserAgent, "Mozilla/5") Then
strBrowser = "Netscape 5"
elseif instr(UAgent, "Mozilla/4") then
strBrowser = "Netscape Navigator 4.x"
elseif instr(UAgent, "Mozilla/3") then
strBrowser = "Netscape Navigator 3.x"
elseif instr(UAgent, "Netscape") then
strBrowser = "Netscape"
else
if instr(UAgent, "Mozilla/5") then
strBrowser = Mid(UAgent, instr(UAgent, "rv:")+3)
strBrowser = Mid(strBrowser, 1, instr(strBrowser, ")"))
strBrowser = Mid(strBrowser, 1, Len(strBrowser)-1)
strBrowser = "Mozilla " & strBrowser
else
strBrowser = "Mozilla"
end if
end if
elseif instr(UAgent, "W3C_Validator") then
strBrowser = "W3C Validator"
elseif instr(UAgent, "Googlebot") then
strBrowser = "Googlebot"
else
strBrowser = "<em title=""Browser: " & UAgent & """>" & fLang("strLangInc_Active_Users00170") & "</em>"
end if
if instr(UAgent, "Ezooms") then strBrowser = "ezooms.bot@gmail.com"
if instr(UAgent, "ia_archiver") then strBrowser = "Alexa.Com"
if instr(UAgent, "Googlebot") then strBrowser = "Google"
if instr(UAgent, "My agent") then strBrowser = "My agent"
if instr(UAgent, "TeomaAgent") then strBrowser = "Teoma.Com"
if instr(UAgent, "Zyborg") then strBrowser = "Wisenut.Com"
if instr(UAgent, "Gulliver") then strBrowser = "NorthernLight.com"
if instr(UAgent, "Architext") then strBrowser = "Excite.com"
if instr(UAgent, "FAST-WebCrawler") then strBrowser = "AllTheWeb.com"
if instr(UAgent, "Slurp") then strBrowser = "Inktomi.com"
if instr(UAgent, "Jeeves") then strBrowser = "AskJeeves.com"
if instr(UAgent, "Scooter") then strBrowser = "AltaVista.com"
if instr(UAgent, "Mercator") then strBrowser = "AltaVista.com"
if instr(UAgent, "crawler@fast") then strBrowser = "AllTheWeb.com"
if instr(UAgent, "Crawler") then strBrowser = "Crawler.de"
if instr(UAgent, "InfoSeek") then strBrowser = "InfoSeek.com"
if instr(UAgent, "Lycos") then strBrowser = "Lycos.com"
if instr(UAgent, "Fluffy") then strBrowser = "SearchHippo.com"
if instr(UAgent, "Baiduspider") then strBrowser = "baidu.com"
if instr(UAgent, "Bingbot") then strBrowser = "bing.com"
if instr(UAgent, "crawler") then strBrowser = "brandwatch.net"
if instr(UAgent, "Ultraseek") then strBrowser = "InfoSeek.com"
if instr(UAgent, "MantraAgent") then strBrowser = "LookSmart.com"
if instr(UAgent, "Moget") then strBrowser = "Goo.jp"
if instr(UAgent, "T-H-U-N-D-E-R-S-T-O-N-E") then strBrowser = "Thunderstone.com"
if instr(UAgent, "MuscatFerret") then strBrowser = "Euroferret.com"
if instr(UAgent, "VoilaBot") then strBrowser = "Voila.fr"
if instr(UAgent, "Sleek Spider") then strBrowser = "Search-info.com"
if instr(UAgent, "KIT_Fireball") then strBrowser = "FireBall.de"
if instr(UAgent, "WebCrawler") then strBrowser = "Webcrawler.com"
if instr(UAgent, "wombat") then strBrowser = "Web Wombat"
if instr(UAgent, "Mediapartners-Google") then strBrowser = "Google AdSense"
if instr(UAgent, "Yahoo! Slurp") then strBrowser = "Yahoo"
if instr(UAgent, "NPBot") then strBrowser = "Domain Research Bot"
if instr(UAgent, "MSNBOT/0.1") then strBrowser = "MSN Search"
if instr(UAgent, "YahooFeedSeeker/") then strBrowser = "Yahoo Feed Seeker"
if instr(UAgent, "msnbot/0.1") then strBrowser = "MSN Search"
if instr(UAgent, "Speedy Spider") then strBrowser = "Entire Web"
if instr(UAgent, "ArchitextSpider") then strBrowser = "Excite"
if instr(UAgent, "ArchitectSpider") then strBrowser = "Excite"
if instr(UAgent, "Ask Jeeves/Teoma") then strBrowser = "Teoma"
if instr(UAgent, "msnbot/") then strBrowser = "MSN"
if instr(UAgent, "Lycos_Spider_(T-Rex)") then strBrowser = "Lycos"
if instr(UAgent, "Google CHTML Proxy/1.0") then strBrowser = "Google Proxy Server"
if instr(UAgent, "Microsoft URL Control") then strBrowser = "Possible Email Collector!!"
if instr(UAgent, "InternetSeer.com") then strBrowser = "Internet Seer"
if instr(UAgent, "Gigabot/") then strBrowser = "Gigabot"
if instr(UAgent, "Jetbot/1") then strBrowser = "Jetbot"
if instr(UAgent, "exactseek-pagereaper-") then strBrowser = "Exactseek"
if instr(UAgent, "YandexBot") then strBrowser = "Yandex"
if instr(UAgent, "Windows 95") or instr(UAgent, "Win95") then
strSystem = "Windows 95"
elseif instr(UAgent, "Win 9x 4.90") then
strSystem = "Windows ME"
elseif instr(UAgent, "Windows 98") or instr(UAgent, "Win98") then
strSystem = "Windows 98"
elseif instr(UAgent, "Windows 3.1") or instr(UAgent, "Win16") then
strSystem = "Windows 3.x/Windows NT 3.x"
elseif instr(UAgent, "NT 5.0") or instr(UAgent, "Windows 2000") then
strSystem = "Windows 2000"
elseif instr(UAgent, "NT 5.1") or instr(UAgent, "Windows XP") then
strSystem = "Windows XP"
elseif instr(UAgent, "NT 6.0") or instr(UAgent, "Windows Vista") then
strSystem = "Windows Vista"
ElseIf instr(UAgent, "NT 6.1") or instr(UAgent, "Windows 7") then
strSystem = "Windows 7"
ElseIf instr(UAgent, "Netscape 7") or instr(UAgent, "Mozilla 5.0") then
strSystem = "Mozilla 5.0"
elseif instr(UAgent, "NT") then
strSystem = "Windows NT"
elseif instr(UAgent, "Mac") then
strSystem = "Mac"
if instr(UAgent, "PowerPC") or instr(UAgent, "PPC") then
strSystem = "Mac PPC"
elseif instr(UAgent, "68000") or instr(UAgent, "68K") then
strSystem = "Mac 68K"
end if
elseif instr(UAgent, "Linux") then
strSystem = "Linux"
elseif instr(UAgent, "X11") then
strSystem = "UNIX"
elseif instr(UAgent, "W3C_Validator") then
strBrowser = "W3C Validator"
elseif instr(UAgent, "Googlebot") then
strSystem = "Googlebot"
else
strSystem = fLang("strLangInc_Active_Users00170")
end if
if strSystem =fLang("strLangInc_Active_Users00170") then strSystem = "Search Engine"
fUserAgent = strSystem & "<br />" & strBrowser
end function
|
|
|
Giumer
Junior Member
Italy
163 Posts |
Posted - 11 November 2012 : 02:26:46
|
sorry mate log and messanger . send me file |
======================= http://www.Giumer.it/forum
======================= |
|
|
Giumer
Junior Member
Italy
163 Posts |
|
golfmann
Junior Member
United States
450 Posts |
Posted - 31 July 2015 : 01:46:27
|
I could use help in getting it to recognize Windows 10 now...
I tried a few things but.... lol
Any ideas and how does one find the user agent for 10 "Professional"? |
Edited by - golfmann on 31 July 2015 01:47:02 |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 31 July 2015 : 04:37:50
|
I thought I'd posted that already, but maybe not. I added it to the modular code.
ElseIf inStr(ua, "NT 6.4") Or inStr(ua, "NT 10.0") Then
strSystem = "Windows 10"
Oddly enough, connecting with the Edge browser reports MSIE 7.0
This was a user's error. He used the IE from W10, which does report MSIE 7 - no idea why the insiders' version of 10 would have an antique version of IE.... Correction has been made below. Notice I placed Edge ABOVE Chrome. The reason is that the user agent string includes Chrome, Gecko, and Safari; all BEFORE they get to saying Edge. So Edge has to come earlier in the code.
Here's the function:
Function fUserAgent(ua)
ua = Request.ServerVariables("HTTP_USER_AGENT")
If InStr(ua, "aardvark") Then
strBrowser = "Aardvark Bot"
ElseIf InStr(ua, "Abacho") Then
strBrowser = "Abacho Bot"
ElseIf InStr(ua, "About") Then
strBrowser = "About Bot"
ElseIf InStr(ua, "Accelatech") Then
strBrowser = "Accelatech Bot"
ElseIf InStr(ua, "accoon") Or InStr(ua, "Accoon") Then
strBrowser = "Accona Bot"
ElseIf InStr(ua, "AESOP") Then
strBrowser = "Aesop Bot"
ElseIf InStr(ua, "agbot") Then
strBrowser = "AgHaven Bot"
ElseIf InStr(ua, "aipbot") Then
strBrowser = "AIP Bot"
ElseIf InStr(ua, "Aladin") Then
strBrowser = "Aladin"
ElseIf InStr(ua, "Aleksika") Then
strBrowser = "Aleksika Spider"
ElseIf InStr(ua, "ia_archiver") Then
strBrowser = "Alexa"
ElseIf InStr(ua, "Alkaline") Then
strBrowser = "Alkaline Bot"
ElseIf InStr(ua, "crawler@fast") Or InStr(ua, "FAST-WebCrawler") Then
strBrowser = "AllTheWeb"
ElseIf InStr(ua, "Mercator") Or InStr(ua, "Scooter") Then
strBrowser = "Altavista"
ElseIf InStr(ua, "Amaya") Or InStr(ua, "amaya") Then
strBrowser = "Amaya Bot"
ElseIf InStr(ua, "Amfibi") Or InStr(ua, "amibot") Then
strBrowser = "AmFib Bot"
ElseIf InStr(ua, "Amniga") Then
strBrowser = "Amiga"
ElseIf InStr(ua, "amzn") Then
strBrowser = "Amazon Bot"
ElseIf InStr(ua, "Anemone") Then
strBrowser = "Anemone Bot"
ElseIf InStr(ua, "AnnoMille") Then
strBrowser = "Anno Mille Bot"
ElseIf InStr(ua, "Chase") Then
strBrowser = "Answer Chase"
ElseIf InStr(ua, "Anzwers") Then
strBrowser = "Anzwers Bot"
ElseIf InStr(ua, "AOL 3") Then
strBrowser = "AOL 3"
ElseIf InStr(ua, "AOL 4") Then
strBrowser = "AOL 4"
ElseIf InStr(ua, "AOL 5") Then
strBrowser = "AOL 5"
ElseIf InStr(ua, "AOL 6") Then
strBrowser = "AOL 6"
ElseIf InStr(ua, "AOL 7") Then
strBrowser = "AOL 7"
ElseIf InStr(ua, "AOL 8") Then
strBrowser = "AOL 8"
ElseIf InStr(ua, "AOL 9") Then
strBrowser = "AOL 9"
ElseIf InStr(ua, "AOL") Then
strBrowser = "AOL"
ElseIf InStr(ua, "Apexoo") Then
strBrowser = "Apexoo Bot"
ElseIf InStr(ua, "Aport") Then
strBrowser = "Aport Bot"
ElseIf InStr(ua, "appie") Then
strBrowser = "Appie Bot"
ElseIf InStr(ua, "Araby") Then
strBrowser = "Araby Bot"
ElseIf InStr(ua, "Arach") Then
strBrowser = "Arach No Idea"
ElseIf InStr(ua, "aranhabot") Then
strBrowser = "Aranha Bot"
ElseIf InStr(ua, "archive") Then
strBrowser = "Archive Org"
ElseIf InStr(ua, "Argus") Then
strBrowser = "Argus"
ElseIf InStr(ua, "arianna.libero.it") Then
strBrowser = "Arianna/Libero"
ElseIf InStr(ua, "Arikus") Then
strBrowser = "Arikus Bot"
ElseIf InStr(ua, "Arquivo") Then
strBrowser = "Arquivo Crawler"
ElseIf InStr(ua, "ASAHA") Then
strBrowser = "Asaha TU"
ElseIf InStr(ua, "Ask.24") Or InStr(ua, "AskAbout") Then
strBrowser = "Ask About"
ElseIf InStr(ua, "asked/Nutch") Then
strBrowser = "Asked Bot"
ElseIf InStr(ua, "Jeeves") Then
strBrowser = "Ask Jeeves"
ElseIf InStr(ua, "ASPSeek") Then
strBrowser = "ASP Seek"
ElseIf InStr(ua, "Baidu") Then
strBrowser = "Baidu Spider"
ElseIf InStr(ua, "Bookdog") Or InStr(ua, "BookMacster") Then
strBrowser = "Bookdog Bot"
ElseIf InStr(ua, "BotTracer") Then
strBrowser = "Bot Tracer"
ElseIf InStr(ua, "Cabot") Then
strBrowser = "Cabot"
ElseIf InStr(ua, "Camino") Or InStr(ua, "Chimera") Then
strBrowser = "Camino"
ElseIf InStr(ua, "CatchBot") Then
strBrowser = "Catch Bot"
ElseIf InStr(ua, "Edge") Then
strBrowser = "Microsoft Edge"
ElseIf InStr(ua, "Chrome") Then
If InStr(ua,"RockMelt") Then
strBrowser = "RockMelt"
strVersion=""
For i = 1 to len(ua)
If mid(ua,i,9)="RockMelt/" Then
j=i+9
Do while not mid(ua,j,1)=" "
strVersion=strVersion&mid(ua,j,1)
j=j+1
Loop
End If
Next
strBrowser=strBrowser&" "&strVersion
Else
strBrowser = "Chrome"
End If
ElseIf InStr(ua, "Clushbot") Then
strBrowser = "Clush Bot"
ElseIf InStr(ua, "Convera") Then
strBrowser = "Convera Crawler"
ElseIf InStr(ua, "CorenSearch") Then
strBrowser = "Coren Bot"
ElseIf InStr(ua, "Crawler") Then
strBrowser = "Crawler DE"
ElseIf InStr(ua, "Dillo") Then
strBrowser = "Dillo"
ElseIf InStr(ua, "Robozilla") Then
strBrowser = "DMOZ"
ElseIf InStr(ua, "DocZilla") Then
strBrowser = "DocZilla"
ElseIf InStr(ua, "NPBot") Then
strBrowser = "Domain Researcher Bot"
ElseIf InStr(ua, "Dreamcast") Then
strBrowser = "Dreamcast"
ElseIf InStr(ua, "Speedy+Spider") Then
strBrowser = "EntireWeb"
ElseIf InStr(ua, "Epiphany") Then
strBrowser = "Epiphany"
ElseIf InStr(ua, "EudoraWeb") Then
strBrowser = "Eudora Web"
ElseIf InStr(ua, "MuscatFerret") Then
strBrowser = "EuroFerret"
ElseIf InStr(ua, "exactseek") Then
strBrowser = "ExactSeek"
ElseIf InStr(ua, "Architext") Then
strBrowser = "Excite"
ElseIf InStr(ua, "Fireball") Then
strBrowser = "Fireball DE"
ElseIf InStr(ua, "Flock") Then
strBrowser = "Flock"
ElseIf InStr(ua, "Galeon") Then
strBrowser = "Galeon"
ElseIf InStr(ua, "Gigabot") Then
strBrowser = "Gigabot"
ElseIf InStr(ua, "Moget") Then
strBrowser = "Goo JP"
ElseIf InStr(ua, "Googlebot") Or InStr(ua, "googlebot") Or InStr(ua, "AppEngine-Google") Or (InStr(ua, "google") and InStr(ua, "bot")) Then
strBrowser = "Google Bot"
ElseIf InStr(ua, "Mediapartners") Then
strBrowser = "Google Adsense"
ElseIf InStr(ua, "Google CHTML") Then
strBrowser = "Google Proxy Server"
ElseIf InStr(ua, "Sun") AND InStr(ua, "Mozilla/3") Then
strBrowser = "HotJava"
ElseIf InStr(ua, "iCab") Then
strBrowser = "iCab"
ElseIf InStr(ua, "ICE") Then
strBrowser = "ICE"
ElseIf InStr(ua, "Infoseek") Or InStr(ua, "Ultraseek") Then
strBrowser = "Infoseek"
ElseIf InStr(ua, "slurp") Or InStr(ua, "Slurp") Then
strBrowser = "Inktomi"
ElseIf InStr(ua, "internetseer") Or InStr(ua, "Internetseer") Then
strBrowser = "InternetSeer"
ElseIf InStr(ua, "Jetbot") Then
strBrowser = "Jetbot"
ElseIf InStr(ua, "Akregator") Then
strBrowser = "KDE RSS Reader"
ElseIf InStr(ua, "Konqueror") Then
strBrowser = "Konqueror"
ElseIf InStr(ua, "Mantra") Or InStr(ua, "ZyBorg") Then
strBrowser = "Look Smart"
ElseIf InStr(ua, "Lycos") Then
strBrowser = "Lycos"
ElseIf InStr(ua, "Lynx") Then
strBrowser = "Lynx"
ElseIf InStr(ua, "MSIE 11") Then
strBrowser = "Microsoft IE 11"
ElseIf InStr(ua, "MSIE 10") Then
strBrowser = "Microsoft IE 10"
ElseIf InStr(ua, "MSIE 9") Then
strBrowser = "Microsoft IE 9"
ElseIf InStr(ua, "MSIE 8") Then
strBrowser = "Microsoft IE 8"
ElseIf (InStr(ua, "MSIE 7") Or mid(ua,26,6)="MSIE 7") Then
strBrowser = "Microsoft IE 7"
If right(ua, 12) = "MS-RTC LM 8)" Then
strBrowser = "Microsoft IE 8"
End If
ElseIf InStr(ua, "MSIE 6") Then
strBrowser = "Microsoft IE 6"
ElseIf InStr(ua, "MSIE 5") Then
strBrowser = "Microsoft IE 5"
ElseIf InStr(ua, "MSIE 4") Then
strBrowser = "Microsoft IE 4"
ElseIf InStr(ua, "MSIE 3") Then
strBrowser = "Microsoft IE 3"
ElseIf InStr(ua, "MSIE 2") Then
strBrowser = "Microsoft IE 2"
ElseIf InStr(ua, "MSIE 1") Then
strBrowser = "Microsoft IE 1"
ElseIf InStr(ua, "Gecko") AND InStr(ua, "Netscape") AND InStr(ua, "rv:0") Then
strBrowser = "Mozilla"
ElseIf InStr(ua, "Gecko") AND InStr(ua, "Netscape") AND InStr(ua, "rv:1") Then
strBrowser = "Mozilla 1"
ElseIf InStr(ua, "Gecko") AND InStr(ua, "Netscape") AND InStr(ua, "rv:2") Then
strBrowser = "Mozilla 2"
ElseIf InStr(ua, "Firebird") AND InStr(ua, "Gecko") Then
strBrowser = "Mozilla Firebird"
ElseIf (InStr(ua, "Firefox") AND InStr(ua, "Gecko")) Or (mid(ua,len(ua)-13,7)="FireFox") Then
strBrowser = "Mozilla Firefox "
For x = 1 to len(ua)-8
If mid(ua,x,8)="Firefox/" Then
strBrowser = "Firefox " & mid(ua,x+8)
End If
Next
ElseIf InStr(ua, "msnbot") Then
strBrowser = "MSN"
ElseIf InStr(ua, "My agent") Then
strBrowser = "My Agent"
ElseIf InStr(ua, "NameProtect") Then
strBrowser = "NameProtect"
ElseIf InStr(ua, "NetCaptor") Then
strBrowser = "Net Captor"
ElseIf InStr(ua, "Mozilla/1") Then
strBrowser = "Netscape 1"
ElseIf InStr(ua, "Mozilla/2") Then
strBrowser = "Netscape 2"
ElseIf InStr(ua, "Mozilla/3") Then
strBrowser = "Netscape 3"
ElseIf InStr(ua, "Mozilla/4") Then
strBrowser = "Netscape 4"
ElseIf InStr(ua, "Mozilla/5") Then
strBrowser = "Netscape 5"
ElseIf InStr(ua, "Netscape/6") Then
strBrowser = "Netscape 6"
ElseIf InStr(ua, "Netscape/7") Then
strBrowser = "Netscape 7"
ElseIf InStr(ua, "Netscape/8") Then
strBrowser = "Netscape 8"
ElseIf InStr(ua, "Gulliver") Then
strBrowser = "Northernlight"
ElseIf InStr(ua, "Opera") Then
strBrowser = "Opera"
ElseIf InStr(ua, "Opera 1") Then
strBrowser = "Opera 1"
ElseIf InStr(ua, "Opera 2") Then
strBrowser = "Opera 2"
ElseIf InStr(ua, "Opera 3") Then
strBrowser = "Opera 3"
ElseIf InStr(ua, "Opera 4") Then
strBrowser = "Opera 4"
ElseIf InStr(ua, "Opera 5") Then
strBrowser = "Opera 5"
ElseIf InStr(ua, "Opera 6") Then
strBrowser = "Opera 6"
ElseIf InStr(ua, "Opera 7") Then
strBrowser = "Opera 7"
ElseIf InStr(ua, "Opera 8") Then
strBrowser = "Opera 8"
ElseIf InStr(ua, "PhpDig") Then
strBrowser = "PhpDig"
ElseIf InStr(ua, "MSPIE 1") Then
strBrowser = "Pocket IE 1"
ElseIf InStr(ua, "MSPIE 2") Then
strBrowser = "Pocket IE 2"
ElseIf InStr(ua, "Microsoft URL Control") Then
strBrowser = "Possible EMail Collector"
ElseIf InStr(ua, "StackRambler") Then
strBrowser = "Rambler"
ElseIf InStr(ua, "Robozilla") Then
strBrowser = "Robozilla"
ElseIf InStr(ua, "Safari") Then
strBrowser = "Safari"
ElseIf InStr(ua, "SeaMonkey") Then
strBrowser = "Sea Monkey"
ElseIf InStr(ua, "Fluffy") Then
strBrowser = "Search Hippo"
ElseIf InStr(ua, "Teoma") Then
strBrowser = "Teoma"
ElseIf InStr(ua, "T-H-U-N-D-E-R-S-T-O-N-E") Then
strBrowser = "Thunderstone"
ElseIf InStr(ua, "TurnitinBot") Then
strBrowser = "Turnitin"
ElseIf InStr(ua, "UbiCrawler") Then
strBrowser = "UbiCrawler"
ElseIf InStr(ua, "Voilabot") Then
strBrowser = "Voila FR"
ElseIf InStr(ua, "W3C_Validator") Then
strBrowser = "W3C Validator"
ElseIf InStr(ua, "WebCrawler") Then
strBrowser = "WebCrawler"
ElseIf InStr(ua, "wombat") Then
strBrowser = "Web Wombat"
ElseIf InStr(ua, "Zyborg") Then
strBrowser = "Wisenut"
ElseIf InStr(ua, "Yahoo") Then
strBrowser = "Yahoo"
Else
strBrowser = "Unknown"
End If
GetBrowser = strBrowser
If InStr(ua, "Amiga") Then
strSystem = "Amiga"
ElseIf InStr(ua, "AOLTV") Or InStr(ua, "AOL_TV") Then
strSystem = "AOL TV"
ElseIf InStr(ua, "BSD") Or InStr(ua, "FreeBSD") Then
strSystem = "Free BSD"
ElseIf InStr(ua, "Linux") Then
strSystem = "Linux"
ElseIf InStr(ua, "68000") Or InStr(ua, "68k") AND InStr(ua, "Mac") Then
strSystem = "Mac 68k"
ElseIf InStr(ua, "Mac OS X") Then
strSystem = "Mac OS X"
ElseIf InStr(ua, "Mac_PowerPC") Or InStr(ua, "PPC") Then
strSystem = "Mac PowerPC"
ElseIf InStr(ua, "Mac") Or (InStr(ua, "Apple") and not InStr(ua, "AppleWebKit")) Then
strSystem = "MacLngosh"
ElseIf InStr(ua, "Nokia") Then
strSystem = "Nokia"
ElseIf InStr(ua, "OS/2") Then
strSystem = "OS/2"
ElseIf InStr(ua, "PalmOS") Then
strSystem = "Palm OS"
ElseIf InStr(ua, "Elaine") Then
strSystem = "PalmPilot"
ElseIf InStr(ua, "Solaris") Then
strSystem = "Solaris"
ElseIf InStr(ua, "SunOS") Then
strSystem = "Sun OS"
ElseIf InStr(ua, "Unix") Or InStr(ua, "X11") Then
strSystem = "Unix"
ElseIf InStr(ua, "WebTV") Then
strSystem = "Web TV"
ElseIf InStr(ua, "NT 6.4") Or InStr(ua, "NT 10.0") Then
strSystem = "Windows 10"
ElseIf InStr(ua, "NT 6.3") Then
strSystem = "Windows 8.1"
ElseIf InStr(ua, "NT 6.2") Or InStr(ua, "Windows 8") Then
strSystem = "Windows 8 Or Server 2012"
ElseIf InStr(ua, "NT 6.1") Or InStr(ua, "Windows 7") Then
strSystem = "Windows 7"
ElseIf InStr(ua, "NT 6.0") Or InStr(ua, "Windows Vista") Then
strSystem = "Windows Vista"
ElseIf InStr(ua, "NT 5.2") Or InStr(ua, "Windows 2003") Then
strSystem = "Windows 2003"
ElseIf InStr(ua, "NT 5.1") Or InStr(ua, "Windows XP") Then
strSystem = "Windows XP"
ElseIf InStr(ua, "NT 5.0") Or InStr(ua, "Windows 2000") Then
strSystem = "Windows 2000"
ElseIf InStr(ua, "NT 4.0") Or InStr(ua, "Windows NT") Or InStr(ua, "WinNT") Then
strSystem = "Windows NT 4"
ElseIf InStr(ua, "Windows 3.1") Or InStr(ua, "Win16") Then
strSystem = "Windows 3.x"
ElseIf InStr(ua, "Windows 95") Or InStr(ua, "Win95") Then
strSystem = "Windows 95"
ElseIf InStr(ua, "Windows 98") Or InStr(ua, "Win98") Then
strSystem = "Windows 98"
ElseIf InStr(ua, "Windows CE") Then
strSystem = "Windows CE"
ElseIf InStr(ua, "Windows ME") Or InStr(ua, "Win 9x 4.90") Then
strSystem = "Windows ME"
Else
strSystem = "Unknown"
End If
GetOS = strSystem
fUserAgent = GetOS & "<br/>" & GetBrowser
End Function
|
Edited by - Carefree on 31 July 2015 07:07:58 |
|
|
golfmann
Junior Member
United States
450 Posts |
Posted - 31 July 2015 : 11:11:07
|
Thank you kind sir... If you did add this in somewhere else I didn't see it (re: the link in bitz)
Hope all is well |
|
|
golfmann
Junior Member
United States
450 Posts |
Posted - 31 July 2015 : 11:42:19
|
Um... sorry to report mine returns Windows 8.1 with that. Which is what it really is... (less that secret femme fatal secret tracking agent... CORTANA...) lol |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 01 August 2015 : 09:36:36
|
Well, if it's really 8.1; what's the problem with it saying so? |
|
|
golfmann
Junior Member
United States
450 Posts |
Posted - 01 August 2015 : 16:50:40
|
It's 10.... Professional as I mentioned above.
I was being facetious
"NT 6.4" evidently isn't correct for 10 and it returns 8.1 on our forum.
Thanks anyway... I'll work around it sooner or later. |
Edited by - golfmann on 01 August 2015 16:53:53 |
|
|
Topic |
|
|
|