Re: How do you handle device detection?

From: Date: Mon, 12 Apr 2004 10:43:06 +0000
Subject: Re: How do you handle device detection?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-183141@lists.php.net to get a copy of this message
But afaik that function is broken, and PHP isn't allowed to use that browscap.ini so.. Better make a list of user_agents that are devices.. -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com "Lukasz Karapuda" <lukasz@karapuda.com> skrev i meddelandet news:20040412035841.75611.qmail@pb1.pair.com... > Richard, > > You would do that by looking at the user_agent parameter that is being send > by the browser to the server. PHP automatically places the user_agent > information in the superglobal: $_SERVER['HTTP_USER_AGENT']. The user_agent > string might seems cryptic, therefore PHP provides you a built-in function > for representing the user agent information in an object with properties > representing the features of the browser. The function is get_browser(). > Link to documentation of this function: > > http://www.php.net/manual/en/function.get-browser.php > > Good luck, > > Lukasz Karapuda > > > > > "Richard Davey" <rich@launchcode.co.uk> wrote in message > news:805410340.20040412020254@launchcode.co.uk... > > Hi all, > > > > This is just a general question to get some ideas from the "wider > > world" as it were. > > > > Say you've finished your site. It looks lovely and works perfectly. > > You have a CSS file for modern browsers and one that degrades for > > text-only devices also. You even have a special "small width" version > > for PDAs and the like. > > > > So how do you go about detecting just what is looking at your site? > > How would you handle detecting and then serving the same site for a > > standard browser, a screen-reader, a PDA device or a WAP/mobile > > device? > > > > Any tips/suggestions gratefully listened to. > > > > -- > > Best regards, > > Richard Davey > > http://www.phpcommunity.org/wiki/296.html

« previous php.general (#183141) next »