Re: Browser Sniffing

From: Date: Wed, 05 Mar 2003 03:24:11 +0000
Subject: Re: Browser Sniffing
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-138218@lists.php.net to get a copy of this message
Search php.ini for: auto_prepend_file = you need the exact location of the file at the end (e.g. /var/www/html/this.php)... Also, you can do an auto_append_file. What's e.g. mean? I know how it's used, but what does ir stand for? lol... "Ashley M. Kirchner" <ashley@pcraft.com> wrote in message news:3E6553B1.6060102@pcraft.com... > > I know, it can't be done in PHP. That's not exactly what I'm here > for. I have a client who would like to redirect people to a polite > 'upgrade your browser' page whenever people visit his site (which has > been developed in PHP no less). My question here is, how can I make > this so that regardless of what URL someone comes in to, it will always > run the sniffer prior to loading the actual URL they visited? In other > words, whether the visitor comes to the main url (http://www.site.org), > or whether they are going to a specific link > (http://ww.site.org/seethis/), the client would like the sniffer to > check them all. > > I know I can stick the whole javascript sniffer into each and every > file, but that's just not efficient. Being that this site was created > in PHP, I can very easily stick an 'include' in each file to include the > javascript piece, however how can I use the results of that javascript > piece inside PHP to then do a Header("Location...") type thing? Can I > even do that considering that javascript normally goes within the > <head>...</head> section, at which point the page headers were already > sent, and doing a Location redirection within PHP will only result in an > error. > > Suggestions welcome. > > -- > W | I haven't lost my mind; it's backed up on tape somewhere. > +-------------------------------------------------------------------- > Ashley M. Kirchner <mailto:ashley@pcraft.com> . > 303.442.6410 x130 > IT Director / SysAdmin / WebSmith . 800.441.3873 x130 > Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6 > http://www.pcraft.com ..... . . . Boulder, CO > 80303, U.S.A. > >

« previous php.general (#138218) next »