Re: Is there an easy way to divid up HTTP_USER_AGENT?
| From: | John Legg | Date: | Fri, 05 Jul 2002 14:38:52 +0000 |
| Subject: | Re: Is there an easy way to divid up HTTP_USER_AGENT? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-105661@lists.php.net to get a copy of this message | ||
Hi
As far as I can see you need to manipulate HTTP_USER_AGENT yourself. Here
is an example that I used to determine if the browser is MSIE and if so what
version it is. What are you trying to determine? A specific browser?
if (strStr($HTTP_USER_AGENT, "MSIE")) {
$agent_array = split(";", $HTTP_USER_AGENT);
$ie_version = subStr($agent_array[1], 6,7);
}
Regards
John
----- Original Message -----
From: "JJ Harrison" <webmaster@tececo.com>
To: <php-general@lists.php.net>
Sent: Friday, July 05, 2002 3:25 PM
Subject: Re: [PHP] Is there an easy way to divid up HTTP_USER_AGENT?
> Because!
>
> Also the audiance that will probably see the site will highly likely not
> have the knowledge or intention to change the user agent var. So my Q
> remains.
>
> To add to my original Q is there seperate vars for browser and OS?
>
> JJ Harrison
> webmaster@tececo.com
> www.tececo.com
>
> "Alberto Serra" <albertoserra@gala.net> wrote in message
> news:3D256C1C.5080800@gala.net...
> > JJ Harrison wrote:
> > > Is there an easy way to divide up $_SERVER['HTTP_USER_AGENT'] or do I
> have
> > > to use regular expressions(Which I have little experiance with)?
> >
> > Why would you want to use that? People write in their HTTP_USER_AGENT
> > whatever they want to, and many times you'll find there a set of 4
> > letter words instead of the info you look for. There is a nice add-on
> > for Mozilla to make that trick even easier.
> >
> > Alberto
> > Kiev
> >
> >
> > --
> >
> >
> > @-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@
> >
> > LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
> > lOrD i'M sHiNiNg...
> > YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
> > tHe TeSt, YeS iT iS
> > ThE tEsT, yEs It Is
> > tHe TeSt, YeS iT iS
> > ThE tEsT, yEs It Is.......
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>