<html>
<head>
<title>Sunrise/Sunset Info, Flagstaff, AZ </title>
</head>
<body bgcolor=#000000>
<?php
date_default_timezone_set('MST');
$time = date('H:i:s');
$tdate = date('Y-m-d');
// Sunset
$sun_info = date_sun_info(strtotime("$tdate"), 35.19, -111.65);
foreach ($sun_info as $key => $val) {
    if ($key == "sunset") {
$sunset = date("H:i:s", $val);
$sunsetu = gmdate("H:i:s", $val);
    }
// Sunrise
    if ($key == "sunrise") {
$sunrise = date("H:i:s", $val);
$sunriseu = gmdate("H:i:s", $val);
    }
// Civil twilight start
    if ($key == "civil_twilight_begin") {
$civtwis = date("H:i:s", $val);
$civtwisu = gmdate("H:i:s", $val);
    }
// Civil twilight end
    if ($key == "civil_twilight_end") {
$civtwie = date("H:i:s", $val);
$civtwieu = gmdate("H:i:s", $val);
    }
// Nautical twilight start
    if ($key == "nautical_twilight_begin") {
$nauttwis = date("H:i:s", $val);
$nauttwisu = gmdate("H:i:s", $val);
    }
// Nautical twilight end
    if ($key == "nautical_twilight_end") {
$nauttwie = date("H:i:s", $val);
$nauttwieu = gmdate("H:i:s", $val);
    }
// Astronomical twilight start
    if ($key == "astronomical_twilight_begin") {
$asttwis = date("H:i:s", $val);
$asttwisu = gmdate("H:i:s", $val);
    }
// Astronomical twilight end
    if ($key == "astronomical_twilight_end") {
$asttwie = date("H:i:s", $val);
$asttwieu = gmdate("H:i:s", $val);
    }
    if ($key == "transit") {
$suntrans = date("H:i:s", $val);
$suntransu = gmdate("H:i:s", $val);
    }
}
$utime = gmdate('H:i:s');
$date = date('Y-m-d');
$ip = gethostbyaddr($_SERVER['REMOTE_ADDR']);
print "
<br>
<table style=\"text-align: left; width: 400px;\" border=\"0\"
cellpadding=\"2\" cellspacing=\"2\">
<tbody>
<tr>
<td style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); width: 400px; font-family: helvetica,arial,tahoma\">Sunrise / Sunset Times for Flagstaff Arizona <br></td></tr></table>

<table style=\"text-align: left; width: 400px;\" border=\"0\"
cellpadding=\"2\" cellspacing=\"2\">
<tbody>
<tr>
<td style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); width: 150px; font-family: helvetica,arial,tahoma\">IP Address <br>
</td>

<td style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); width: 250px; font-family: helvetica,arial,tahoma\"> $ip<br>
</td>
</tr>
<tr>
<td style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); width: 150px; font-family: helvetica,arial,tahoma\">Current Date <br>
</td>
<td style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); font-family: helvetica,arial,tahoma\"> $date<br>
</td>
</tr>
<tr>
<td style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); width: 150px; font-family: helvetica,arial,tahoma\">Current Time <br>
</td>
<td style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); font-family: helvetica,arial,tahoma\"> $time MST &nbsp; $utime UT<br>
</td>
</tr>
<tr>
<td style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); width: 200px; font-family: helvetica,arial,tahoma\">Astro-twilight Start<br>
</td>
<td
style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); font-family: helvetica,arial,tahoma\"> $asttwis MST &nbsp; $asttwisu UT<br>
</td>
</tr>
<tr>
<td
style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); width: 200px; font-family: helvetica,arial,tahoma\">Naut-twilight Start<br>
</td>
<td
style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); font-family: helvetica,arial,tahoma\">$nauttwis MST &nbsp; $nauttwisu UT<br>
</td>
</tr>
<tr>
<td
style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); width: 200px; font-family: helvetica,arial,tahoma\">Civil Twilight Start<br>
</td>
<td
style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); font-family: helvetica,arial,tahoma\">$civtwis MST &nbsp; $civtwisu UT<br>
</td>
</tr>
<tr>
<td
style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); width: 200px; font-family: helvetica,arial,tahoma\">Sunrise<br>
</td>
<td
style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); font-family: helvetica,arial,tahoma\">$sunrise MST &nbsp; $sunriseu UT<br>
</td>
</tr>
<tr>
<td
style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); width: 200px; font-family: helvetica,arial,tahoma\">Sun Transit<br>
</td>
<td
style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); font-family: helvetica,arial,tahoma\">$suntrans MST &nbsp; $suntransu UT<br>
</td>
</tr>
<tr>
<td
style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); width: 200px; font-family: helvetica,arial,tahoma\">Sunset<br>
</td>
<td
style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); font-family: helvetica,arial,tahoma\">$sunset MST &nbsp; $sunsetu UT<br>
</td>
</tr>
<tr>
<td
style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); width: 200px; font-family: helvetica,arial,tahoma\">Civil Twilight End<br>
</td>
<td
style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); font-family: helvetica,arial,tahoma\">$civtwie MST &nbsp; $civtwieu UT<br>
</td>
</tr>
<tr>
<td
style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); width: 200px; font-family: helvetica,arial,tahoma\">Naut-twilight End<br>
</td>
<td
style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); font-family: helvetica,arial,tahoma\">$nauttwie MST &nbsp; $nauttwieu UT<br>
</td>
</tr>
<tr>
<td
style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); width: 200px; font-family: helvetica,arial,tahoma\">Astro-twilight End<br>
</td>
<td
style=\"vertical-align: top; background-color: rgb(51, 51, 51); color: rgb(255, 255, 255); font-family: helvetica,arial,tahoma\">$asttwie MST &nbsp; $asttwieu UT<br>
</td>
</tr>
</tbody>
</table>";
?>

</body>
</html>


