Nope, 'cause there isn't a well defined way to format the text string. And
the browsers all pretend to be each other. IE tells you it's Mozilla, Opera
tells you it's IE, etc. And on top of that, the OS name is screwed. Win2K is
listed as NT 5.0 while XP is NT 5.1.
The only reliable way to detect the browser type is to compare the signature
to a database of known browsers, which is what get_browser() does.
Given that few of us has the resource to support every browser under the
sun, it's probably more practical to check for specific browser. If see if
the client is IE, do strstr($_SERVER['HTTP_AGENT'], "MSIE"). To see if it's
Netscape 6 or above or something like it, look for "Gecko".
Uzytkownik "Hayden Kirk" <sp**@spam.com> napisal w wiadomosci
news:p3*******************@news02.tsnz.net...
What about something with regular expressions?
There must be a way if there is that sniff php script...
"Chung Leong" <ch***********@hotmail.com> wrote in message
news:bv********************@comcast.com... Well, there isn't a way. The user agent string is a complete mess. You
can't get what you want by parsing it.
Uzytkownik "Hayden Kirk" <sp**@spam.com> napisal w wiadomosci
news:aD*******************@news02.tsnz.net... Without using that function :P
Thanks,
Hayden Kirk
"Chung Leong" <ch***********@hotmail.com> wrote in message
news:K4********************@comcast.com...
> Use the get_browser() function.
>
> See http://www.php.net/manual/en/function.get-browser.php.
>
> Uzytkownik "Hayden Kirk" <sp**@spam.com> napisal w wiadomosci
> news:Jh*******************@news02.tsnz.net...
> > Does anyone know where I should start with this. Im trying to extract the
> > information in:
> > $_SERVER['HTTP_USER_AGENT'
> >
> > But I dont know how to get the information out? What functions
should I be
> > looking at. I want to get the OS, Browser, IP etc..
> >
> > Thanks
> > Hayden Kirk
> >
> >
>
>