$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 "
Sunrise / Sunset Times for Flagstaff Arizona
IP Address
$ip
Current Date
$date
Current Time
$time MST   $utime UT
Astro-twilight Start
$asttwis MST   $asttwisu UT
Naut-twilight Start
$nauttwis MST   $nauttwisu UT
Civil Twilight Start
$civtwis MST   $civtwisu UT
Sunrise
$sunrise MST   $sunriseu UT
Sun Transit
$suntrans MST   $suntransu UT
Sunset
$sunset MST   $sunsetu UT
Civil Twilight End
$civtwie MST   $civtwieu UT
Naut-twilight End
$nauttwie MST   $nauttwieu UT
Astro-twilight End
$asttwie MST   $asttwieu UT
"; ?>