ok - so this must still have something missing - can anyone help with what else i need to do? All i want is the starsign for each day...
Code:
<?php
// Keplerian elements and their rates, with respect to the mean ecliptic
// and equinox of J2000, valid for the time-interval 1800 AD - 2050 AD.
// venus
$Lo= 181.97909950; // mean longitude [degrees]
$LC= 58517.81538729; // mean longitude [degrees/century]
$month = 3;
$year = 2010;
$hour = 04;
$min = 00;
$sec = 00;
$signs = array (0 => 'Aries', 'Taurus', 'Gemini', 'Cancer', 'Leo', 'Virgo', 'Libra', 'Scorpio', 'Sagittarius', 'Capricorn', 'Aquarius', 'Pisces');
for ($day=1;$day<32;$day++) {
$phpdate = mktime($hour,$min,$sec,$month,$day,$year);
$julianDate = gregoriantojd($month, $day, $year);
//correct for half-day offset
$dayfrac = date('G',$phpdate) / 24 - .5;
if ($dayfrac < 0) $dayfrac += 1;
//now set the fraction of a day
$frac = $dayfrac + (date('i',$phpdate) + date('s',$phpdate) / 60) / 60 / 24;
$julianDate = $julianDate + $frac;
$Teph = $julianDate;
// number of centuries past J2000.0
$T = (($Teph - 2451545.0)/36525);
// compute value of elements for date
$L = ($Lo+($LC*$T));
// remove whole circles
$z = fmod($L,360);
// find the starsign
$sign_num = floor($z / 30);
$thedate = date("d-m-Y",$phpdate);
echo "$thedate - $z - $sign_num - $signs[$sign_num]<br />";
}
?>
output
Code:
01-03-2010 - 10.1554881252 - 0 - Aries
02-03-2010 - 11.7576185944 - 0 - Aries
03-03-2010 - 13.3597490636 - 0 - Aries
04-03-2010 - 14.9618795328 - 0 - Aries
05-03-2010 - 16.564010002 - 0 - Aries
06-03-2010 - 18.1661404712 - 0 - Aries
07-03-2010 - 19.7682709404 - 0 - Aries
08-03-2010 - 21.3704014096 - 0 - Aries
09-03-2010 - 22.9725318788 - 0 - Aries
10-03-2010 - 24.574662348 - 0 - Aries
11-03-2010 - 26.1767928172 - 0 - Aries
12-03-2010 - 27.7789232864 - 0 - Aries
13-03-2010 - 29.3810537555 - 0 - Aries
14-03-2010 - 30.9831842247 - 1 - Taurus
15-03-2010 - 32.5853146939 - 1 - Taurus
16-03-2010 - 34.1874451631 - 1 - Taurus
17-03-2010 - 35.7895756323 - 1 - Taurus
18-03-2010 - 37.3917061015 - 1 - Taurus
19-03-2010 - 38.9938365707 - 1 - Taurus
20-03-2010 - 40.5959670399 - 1 - Taurus
21-03-2010 - 42.1980975091 - 1 - Taurus
22-03-2010 - 43.8002279783 - 1 - Taurus
23-03-2010 - 45.4023584475 - 1 - Taurus
24-03-2010 - 47.0044889167 - 1 - Taurus
25-03-2010 - 48.6066193859 - 1 - Taurus
26-03-2010 - 50.2087498551 - 1 - Taurus
27-03-2010 - 51.8108803243 - 1 - Taurus
28-03-2010 - 53.4130107934 - 1 - Taurus
29-03-2010 - 55.0151412626 - 1 - Taurus
30-03-2010 - 56.6172717318 - 1 - Taurus
31-03-2010 - 58.219402201 - 1 - Taurus