-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathtransit.php
33 lines (22 loc) · 1.02 KB
/
transit.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
// path to swiss ephemeris library files
$libPath = './sweph/';
putenv("PATH=$libPath");
//$usersTimezone = 'Asia/Kathmandu';
//$currentDate = new DateTime("now", new DateTimeZone($usersTimezone) );
$currentDate = new DateTime("now");
$date = $currentDate->format('d.m.Y');
$time = $currentDate->format('H:i:s');
# OUTPUT ARRAY
# Planet Name, Planet Degree, Planet Speed per day
// More about command line options: https://www.astro.com/cgi/swetest.cgi?arg=-h&p=0
// TROPICAL ZODIAC
exec ("swetest -edir$libPath -b$date -ut$time -p0123456789mt -eswe -fPls -g, -head", $output_t);
var_dump($output_t);
// SIDEREAL ZODIAC using Lahiri Ayanamsa | Planetary position for single day
exec ("swetest -edir$libPath -b$date -ut$time -p0123456789mt -n1 -sid1 -eswe -fPls -g, -head", $output_s);
var_dump($output_s);
// SIDERAL ZODIAC using Lahiri Ayanamsa | Planetary position for 5 consecutive days
exec ("swetest -edir$libPath -b$date -ut$time -p0123456789mt -n5 -sid1 -eswe -fPls -g, -head", $output_s5);
var_dump($output_s5);
?>