Re: $_SERVER['HTTP_USER_AGENT'] in html email

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxx 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@xxxxxxxx>
To: "<php-general@xxxxxxxxxxxxx> <php-general@xxxxxxxxxxxxx>"
<php-general@xxxxxxxxxxxxx>
Date: Tuesday, January 18, 2005 03:08:16 PM -0800
Subject:  $_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 ----------


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux