| ||||
|
|
|
|
#1 |
|
Pro Member
Join Date: Jul 2005
Location: freewebspace.net\forums
Posts: 315
![]() |
Get Client Info
while testing ($_SERVER['HTTP_USER_AGENT']
predefined variable, to get some client info, i got some weird result, on firefox i got: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 on opera i got: Opera/9.00 (Windows NT 5.1; U; en) on IE 7: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Avant Browser; FDM; .NET CLR 1.1.4322; .NET CLR 2.0.50727) what does mozilla has to do with MS IE 7 ---------------------------------------------------------------------------- Another thing, i used get_broswer to get the platform, and it worked fine on the server, but apparently one of my clients host is blocking it. is there anyway to get the os without using get_broswer |
|
|
|
|
|
#2 |
|
stop staring
Join Date: May 2006
Location: http://interviolet.com
Posts: 3,606
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
same for ie6, and has been for a couple of version now, not sure exactly why, but u see there ie identifies as MSIE and always has.
perhaps someone else knows the reason, for as long as I can remember it's been that way
__________________
(\__/) Joe Watkins (='.'=) PHP Programmer (")_(") http://interviolet.com Copy and paste bunny into your sig, help him gain world domination. |
|
|
|
|
|
#3 |
|
Pro Member
Join Date: Jul 2005
Location: freewebspace.net\forums
Posts: 315
![]() |
so do you know, of anyway to get the client operating system, without using get_browser
|
|
|
|
|
|
#4 |
|
stop staring
Join Date: May 2006
Location: http://interviolet.com
Posts: 3,606
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
theres not a fool proof way, best I can think of is
PHP Code:
__________________
(\__/) Joe Watkins (='.'=) PHP Programmer (")_(") http://interviolet.com Copy and paste bunny into your sig, help him gain world domination. |
|
|
|
|
|
#5 |
|
Sup, Recoil here.
Join Date: Jun 2005
Location: Uzbekistan
Posts: 8,546
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
I think IE6/7 is based on the Mozilla framework.. at least that's the only explanation I can think of.
http://www.siteware.ch/webresources/useragents/db.html is a pretty useful resource. |
|
|
|
|
|
#6 |
|
Pro Member
Join Date: Jul 2005
Location: freewebspace.net\forums
Posts: 315
![]() |
i made something very similar to that, but it's not very accurate, i need something like the one that they use in webaliser, do you know of any javascript code that can do it
|
|
|
|
|
|
#7 |
|
Pro Member
Join Date: Jul 2005
Location: freewebspace.net\forums
Posts: 315
![]() |
ok, so i found the script in the manual, and it's somewhat similar to what KRAK_JOE came up with:
$curos=strtolower($_SERVER['HTTP_USER_AGENT']); if (strstr($curos,"mac")) { $uos="MacOS"; } else if (strstr($curos,"linux")) { $uos="Linux"; } else if (strstr($curos,"win")) { $uos="Windows"; } else if (strstr($curos,"bsd")) { $uos="BSD"; } else if (strstr($curos,"qnx")) { $uos="QNX"; } else if (strstr($curos,"sun")) { $uos="SunOS"; } else if (strstr($curos,"solaris")) { $uos="Solaris"; } else if (strstr($curos,"irix")) { $uos="IRIX"; } else if (strstr($curos,"aix")) { $uos="AIX"; } else if (strstr($curos,"unix")) { $uos="Unix"; } else if (strstr($curos,"amiga")) { $uos="Amiga"; } else if (strstr($curos,"os/2")) { $uos="OS/2"; } else if (strstr($curos,"beos")) { $uos="BeOS"; } else { $uos="Unknown OS"; } i just thought i put here, so if anybody in the future might needed, it will be on FWS And if someone is intersted in developing it,, even more, here's a list of what HTTP_USER_AGENT might come back with: http://www.siteware.ch/webresources/.../db.html#other Regards Darko |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
| Free webhosting | News | Search free hosts | Free file hosting · Free image hosting | Forums | Advertising Info | Contact Us |