I have a school assignment and I cannot get the code to come out right at all.
Here is how the output is supposed to look.
Assignment 3
This is my Web page.
Today is 09-16-2005 and the time is 17:46:59.
You are running Internet Explorer.
Your are running Windows.
Your IP address is 216.96.47.96
and here is my code.
<!-- Jason Paul R. Wilson
ITEC 4282 PHP -->
<html>
<head>
<title>Jason Wilson :: Assignment Three</title>
</head>
<body>
<?php
echo "=============================================================";
echo "<br/>";
echo "<h2 style='font-family:verdana'>Assignment Three</h2>";
echo "<p>This is my web page.</p>";
echo "<p>Today is " . date("l") . " " . date("d") . date("S") . " " . date("F") . ", " . date("Y") . ".";
$browser = $_SERVER["HTTP_USER_AGENT"];
if (eregi("MSIE",$browser))
{
echo "<p style='font-family:verdana'> You are running Internet Explorer. What is wrong with you, simplify your life and get the Fox.</p>";
}
else if (eregi("Netscape",$browser))
{
echo "<p style='font-family:verdana'>You are running Netscape. Why aren't you running firefox?</p>";
}
else if (eregi("Firefox",$browser))
{
echo "<p style='font-family:verdana'>You are running Firefox, good job!</p>";
}
//Determine operating system
if (eregi("WINDOWS", $browser))
{
echo "<p style='font-family:verdana'>Your are running Windows.</p>";
}
else
{
echo "<p style='font-family:verdana'>Your are running a non-Windows OS.</p>";
//IP address
echo "<p style='font-family:verdana'>Your IP address is " . $_SERVER[REMOTE_ADDR] . "</p>";
?>
</body>
</html>
When I try to run it (http://studentweb.maconstate.edu/jwils403/ITEC4282/Assignment3.php) it does nothing but produce a blank screen. I am using FIrefox if that matters.