I have been working on my own php script to get current down or up for sun and moon. I had to add function for any places that have 24 hour sun.
here is my code for places with 24 hour sun.
<?php
if ($sunrise == 0 && $sunset == 0) {
$sunrise24 = "";
$sunset24 = "";
//run suninfo
$sunup = date_sun_info(strtotime($year."-".$month."-".$day), $lat, $lon);
}
//check if sun is up all day.
if ($sunup[sunrise] == 1 && $sunup[sunrise] == 1) {
imagecopy($sky, $sun, 60, 20, 0, 0, $sun_width, $sun_height);
imagefill($sky, 0, 0, $bluesky);
}
?>