<?
$agent = getenv("HTTP_USER_AGENT");
if (preg_match("/Win/i", "$agent")) {
$style = "win";
}
else if (preg_match("/Linux/i", "$agent")) {
$style = "linux";
}
$win_style = "<style type=\"text/css\">p, ul, ol, li
{font-family:Arial;font-size:10pt;font-weight:normal;}
h1 {font-family:Arial;font-size:16pt;font-weight:bold;}
h2 {font-family:Arial;font-size:14pt;font-weight:bold;}
strong {font-family:Arial;font-size:10pt;font-weight:bold;}
em {font-family:Arial;font-size:10pt;font-weight:italic;}
</sytle>";
$linux_style = "<style type=\"text/css\">
p, ul, ol, li {font-family:Times;font-size:12pt;font-weight:normal;}
h1 {font-family:Times;font-size:18pt;font-weight:bold;}
h2 {font-family:Times;font-size:16pt;font-weight:bold;}
strong {font-family:Times;font-size:12pt;font-weight:bold;}
em {font-family:Times;font-size:12pt;font-weight:italic;}
</sytle>";
?>
<HTML>
<HEAD>
<TITLE>Platform Matching</TITLE>
<?
if ($style == "win") {
echo "$win_style";
} else if ($style == "linux") {
echo "$linux_style";
}
?>
</HEAD>
<BODY>
<h1 align=center>This is a level 1 heading</h1>
<h2 align=center>Look! a level 2 heading</h2>
<P align=center>This is a simple paragraph with some
<strong>bold</strong> and <em>emphasized</em> text.</P>
</BODY>
</HTML>