It can be done using php5 with the new sunrise and sunset functions. I tried it and the functions work well, unfortunately, I have to keep php4 active because of some poorly written old php code on my system that is beyond my ability to correct. The code for checking should look something like this:
<?php
if (
(gettimeofday() < date_sunrise(time(),SUNFUNCS_RET_DOUBLE,38.4,-9,90,1)) || (gettimeofday() > date_sunset(time(),SUNFUNCS_RET_DOUBLE,38.4,-9,90,1))
)
{
echo("Sunrise time: ");
echo(date_sunrise(time(),SUNFUNCS_RET_STRING,38.4,-9,90,1));
}
else
{
echo("Sunset time: ");
echo(date_sunset(time(),SUNFUNCS_RET_STRING,38.4,-9,90,1));
}
?>
[corrections form php gurus are encouraged]
The SUNFUNCS arguments need to reflect your location
//Latitude: 38.4 North
//Longitude: 9 West
//Zenith ~= 90
//offset: +1 GMT
I guess you could use similar code and replace the comparisons and output with either weatherlink tags or vws tags but you would need to get them into variables in the correct format.