<html>
<head>
  <title>A "Hello World" script</title>
</head>
<body>
  <?php
  echo '<p>Hello World</p>'; 
  // phpinfo();
  $agent = $_SERVER['HTTP_USER_AGENT'];
  echo "User agent:" . $agent . "<br/>" ;
  echo "Searching... " . strpos('blah' . $agent, 'Mozilla') . "<br/>";

  if (strpos('blah' . $agent, 'Mozilla') == FALSE) {
  ?>
  <p>You're using a non-Mozilla browser</p>
  <?php
  } else {
  ?>
  <p>You're using a Mozilla browser</p>
  <?php
  }
  ?>

  <?php
  $now = getdate();
  // echo "Current date: $now <br/>";
  if ($now['hours'] < 12) {
    echo "Good morning!";
    } else if ($now['hours'] < 18) {
    echo "Good afternoon!";
    } else {
    echo "Good evening!";
    }
  $weekday = $now['weekday'];
  $month = $now['month'];
  $mday = $now['mday'];
  echo "  Today is $weekday, $month $mday .";
  ?>
</body>
</html>
