RE: [PHP] Re: code check

From: Date: Fri, 24 Aug 2001 18:37:55 +0000
Subject: RE: [PHP] Re: code check
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-64306@lists.php.net to get a copy of this message
I do have the little script active on my website - http://www.tom-malone.com. I don't know anyone who has a mac though. Isn't there a site somewhere that allows you to view what your site looks like in other browsers/OSs? I've searched but can't find one. Or perhaps some kind mac user on the list would view source on it to determine if it worked by checking the font tags for face="geneva"? I could compensate you by being extremely nice to you for the rest of your life... =) Tom Malone Web Designer http://www.tom-malone.com -----Original Message----- From: Gabe da Silveira [mailto:jiblet@visi.com] Sent: Thursday, August 23, 2001 2:23 PM To: php-general@lists.php.net Subject: [PHP] Re: code check Perhaps you could put it on a webpage and ask a Mac user to see if it works. BTW, there is no reason to use preg_match for that. Instead use strpos(), it is MUCH faster. In article <JPEOKCOKMOJMOOOEPBHJMEKBEKAA.tom@tom-malone.com>, tom@tom-malone.com (Tom Malone) 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)? > > 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 > -- __________________________________ Gabe da Silveira, Web Designer Twin Cities Student Unions University of Minnesota http://www.coffman.umn.edu wFone: (612)624-7270 eMail: jiblet@visi.com hPage: http://www.visi.com/~jiblet -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#64306) next »