Re: code check

From: Date: Thu, 23 Aug 2001 19:32:07 +0000
Subject: Re: code check
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-64167@lists.php.net to get a copy of this message
on 8/23/01 11:51 AM, Tom Malone at tom@tom-malone.com wrote: > Sorry to bother you all with this, but I have no way to test this, as I have > no access to a Mac. Could you tell me if this little piece of code looks as > if it would work (detect whether someone's using the Mac OS)? ie 5.0 macos 9, powermac G3, i end up in the 'true' branch, but nothing happens to my font that i can tell... > > if (preg_match("/mac/i", "$HTTP_USER_AGENT") || > preg_match("/macintosh/i", > "$HTTP_USER_AGENT") || preg_match("/ppc/i", "$HTTP_USER_AGENT") > || > preg_match("/PowerPC/i", "$HTTP_USER_AGENT")): > $basefont = "Geneva"; > else: > $basefont = "Verdana, Helvetica, Serif"; > endif; > > It doesn't return an error, but that doesn't mean it works. I really > appreciate your help. TIA > > Tom Malone > Web Designer > http://www.tom-malone.com > -- mike cullerton

« previous php.general (#64167) next »