Re: $_SERVER['HTTP_USER_AGENT'] in html email
| From: | Graham Anderson | Date: | Wed, 19 Jan 2005 01:14:50 +0000 |
| Subject: | Re: $_SERVER['HTTP_USER_AGENT'] in html email | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-206722@lists.php.net to get a copy of this message | ||
What would be the standard/accepted way to do this?
is it better to spell it out in the html email ?
Download:
Mac PC Linux ?
many thanks :)
On Jan 18, 2005, at 4:06 PM, php-list-replies@listmail.innovate.net wrote:
php is server-side, so no. you might be able to do what you're after with javascript, but any sensible person has that turned off in general, and especially for html e-mail. [remember, there are more operating systems/platforms than pc and mac (with OS variations within those), so defaulting to "download" if it's not mac would not be a nice thing to do. the download should be on the positive match, not the fall-through.] ---------- Original Message ----------From: Graham Anderson <grahama@siren.cc> To: "<php-general@lists.php.net> <php-general@lists.php.net>"<php-general@lists.php.net>Date: Tuesday, January 18, 2005 03:08:16 PM -0800 Subject: [PHP] $_SERVER['HTTP_USER_AGENT'] in html email is it possible to use $_SERVER['HTTP_USER_AGENT'] in an html email ? something like: //What should we download based on user's platform ? if (strpos($_SERVER['HTTP_USER_AGENT'], 'Macintosh') !== FALSE) { $download = 'Fonovisa.dmg'; echo 'Mac'; } else { echo 'PC'; $download = '!Fonovisa.exe'; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php---------- End Original Message ----------