Kundli match Php Script

Demo
NakshtraSwati [15]Chitra [14]
ZodiacLibraLibra
Moon200.00180.00
VarnaShudraVaishya0
VasyaManMan2
Tarajanm taara vipat taara1.5
YonimahishTiger0
MatriVenusVenus5
Ganadevmonster0
BhakootLibraLibra7
Nadiend nadimiddle nadi8
Total23.5/36
Example

include "Goon.php";
$n=new goon;
$r=$n->match(122.67,180.90); // boy - moon Degree , girl - moon Degree
echo "<table>";
foreach($r as $k=>$v){
echo "<tr>";
foreach($v as $kk=>$vv){
echo "<td>".$vv."</td>";
}
echo "</tr>";
}
echo "</table>";
PHP Class : Goon.php
<?php
class Goon{
function 
match($b,$g){
if((
$b>=&& $b<360) && ($g>=&& $g<360) )
{    
    
$this->b=$b;
    
$this->g=$g;
}
else
return 
false;
    
    
$this->UD =["Revati","Ashvini","Bharani","Kritika","Rohini","Mrigashira","Ardra","Punarvasu","Pushya","Ashlesha","Magha","Purva Phalguni","Uttara Phalguni","Hasta","Chitra","Swati","Vishakha","Anuradha","Jyeshtha","Mula","Purva Ashadha","Uttara Ashadha","Shravan","Dhanistha","Shatabhishaj","Purva Bhadrapad","Uttara Bhadrapad","Revati"];
    
$this->asRashi = ["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpius","Sagittarius","Capricornus","Aquarius","Pisces"];
    
$this->swami=["Mars","Venus","Mercury","Moon","Sun","Mercury","Venus","Mars","Jupiter","Saturn","Saturn","Jupiter"];
$out=[];
$r $this->nak();
$out[]=['Nakshtra',$r[0],$r[1],''];
$r $this->rashi();
$out[]=['Zodiac',$r[0],$r[1],''];
$out[]=['Moon',number_format((float)$b2'.'''),number_format((float)$g2'.'''),''];
$r $this->vran();
$out[]=['Varna',$r[1],$r[2],$r[0]];
$total $r[0];
$r =$this->vashya();
$out[]=['Vasya',$r[1],$r[2],$r[0]];
$total $total $r[0];
$r =$this->tara();
$out[]=['Tara',$r[1],$r[2],$r[0]];
$total $total $r[0];
$r =$this->yoni();
$out[]=['Yoni',$r[1],$r[2],$r[0]];
$total $total $r[0];
$r =$this->matri();
$out[]=['Matri',$r[1],$r[2],$r[0]];
$total $total $r[0];
$r=$this->gun();
$out[]=['Gana',$r[1],$r[2],$r[0]];
$total $total $r[0];
$r $this->bhakoot();
$out[]=['Bhakoot',$r[1],$r[2],$r[0]];
$total $total $r[0];
$r =$this->naadi();
$out[]=['Nadi',$r[1],$r[2],$r[0]];
$total $total $r[0];
$out[]=['<b>Total</b>','','','<b>'.$total.'</b>/36'];
return 
$out;
}
function 
nak(){
    
$g=ceil($this->g/(800/60));
$b=ceil($this->b/(800/60));
return [
$this->UD[$b].' ['.$b.']',$this->UD[$g].' ['.$g.']']; 
}

function 
rashi(){
$g=intval($this->g/30);
$b=intval($this->b/30);

return [
$this->asRashi[$b],$this->asRashi[$g]]; 
}

function 
bhakoot(){
            
$g=intval($this->g/30);
$b=intval($this->b/30);
    
$bb=fmod((12+($g))-($b),12);
$gg=fmod((12+($b))-($g),12);
$b1=fmod($bb+1,12);
$g1=fmod($gg+1,12);

    if((
$g1 == && $b1 == 12 || $g1 == 12 && $b1 == 2) || ($g1 == && $b1 == || $g1 == && $b1 == 5) || ($g1 == && $b1 == || $g1 == && $b1 == 6))
$gk=0;
else
    
$gk=7;
return [
$gk,$this->asRashi[$b],$this->asRashi[$g]];
        }

function 
matri(){
        
$g=intval($this->g/30);
$b=intval($this->b/30);
    
$ex=[2,5,3,1,0,3,5,2,4,6,6,4];    
$nadi=array(
[
5,5,5,4,5,0,0],
[
5,5,4,1,4,0.5,0.5],
[
5,4,5,0.5,5,3,0.5],
[
4,1,0.5,5,0.5,5,4],
[
5,4,5,0.5,5,0.5,0.5,3],
[
0,0.5,3,5,0.5,5,5],
[
0,0.5,0.5,4,3,5,5]);
return [
$nadi[$ex[$g]][$ex[$b]],$this->swami[$b],$this->swami[$g]];
}    

function 
yoni(){
        
$g=ceil($this->g/(800/60));
$b=ceil($this->b/(800/60));
$yoni=["Horse""Yard""Mesh""Snake""Dog""Marjar""Mouse""Cow""mahish""Tiger""Deer""Monkey""nakul ","Lion"];
$yoni1=array([1,24],[2,27],[3,8],[4,5],[6,19],[7,9],[10,11],[12,26],[13,15],[14,16],[17,18],[20,22],[21,21],[23,25]);
foreach(
$yoni1 as $k=>$v)
{
if (
in_array($g$v))
$gg=$k;
if (
in_array($b$v))
$bb=$k;    
}
    
$nadi=array(
    [
4,0,1,2,3,2,2,1,3,2,3,3,1,3],
    [
0,4,1,3,3,2,2,2,2,2,2,2,1,3],
    [
1,1,4,0,1,2,2,2,1,1,2,1,2,1],
    [
2,2,0,4,2,2,2,2,2,2,3,2,1,2],
    [
3,3,1,2,4,0,3,1,3,2,3,2,1,3],
    [
2,2,2,2,0,4,2,1,2,2,2,2,1,2],
    [
2,2,2,2,3,2,4,0,2,1,2,2,2,2],
    [
1,2,2,2,1,1,0,4,1,1,1,1,2,1],
    [
3,3,1,2,3,2,2,1,4,0,2,2,1,2],
    [
2,2,1,2,2,2,1,1,0,4,1,1,1,1],
    [
3,2,2,3,3,2,2,1,2,1,4,0,2,2],
    [
3,2,1,2,2,2,2,1,2,1,0,4,2,2],
    [
1,1,2,1,1,1,2,2,1,1,2,2,4,0],
    [
3,3,1,2,3,2,2,1,2,1,2,2,0,4]
    );    
return [
$nadi[$gg][$bb],$yoni[$bb],$yoni[$gg]];
}

function 
tara(){


    
$g=ceil($this->g/(800/60));
$b=ceil($this->b/(800/60));
        
$na=["janm taara","sampat taara"," vipat taara","kshem taara ","pratyari taara ","saadhak taara","vadh taara","mitr taara","ati mitr taara"];

    
$tara=[2,4,6];

$bb=fmod((27+($g))-($b),27);
$gg=fmod((27+($b))-($g),27);
$bb=fmod($bb+1,9);
$gg=fmod($gg+1,9);

if(
in_array($gg,$tara))
    
$g=0;
else
    
$g=1.5;

if(
in_array($bb,$tara))
    
$b=0;
else
    
$b=1.5;
return [(
$b+$g),$na[$bb],$na[$gg]];
}

function 
vashya(){
    
$g=$this->g;
$b=$this->b;
$ax=["Man""quadruped""watering""lion""scorpio"];
$n[0]=array([60,90],[150,180],[180,210],[240,255],[300,330]);
$n[1]=array([0,30],[30,60],[255,270],[270,285]);
$n[2]=array([90,120],[285,300],[330,360]);
$n[3]=array();
$n[4]=array();
$bb=0;
$gg=0;
foreach(
$n as $k=>$v){
    if(
is_array($v)){    
        foreach(
$v as $kk=>$vv){
            if (
$g $vv[1] && $g >= $vv[0])
            
$gg=$k;
            if (
$b $vv[1] && $b >= $vv[0])
            
$bb=$k;
        }
    }
}
$nadi=array([2,0,0,0.5,0],[1,2,1,0.5,1],[0.5,1,2,1,1],[0,0,0,2,0],[1,1,1,0,2]);    
return [
$nadi[$gg][$bb],$ax[$bb],$ax[$gg]];
}
    
function 
vran(){
$g=ceil($this->g/30);
$b=ceil($this->b/30);
$ax= ["Brahmin""Kshatriya""Vaishya""Shudra"];
$varn=array(array(4,8,12),array(1,5,9),array(2,6,10),array(3,7,11));
    foreach(
$varn as $k=>$v){
if (
in_array($g$v))
$gg=$k;
if (
in_array($b$v))
$bb=$k;
}

$nadi=array([1,0,0,0],[1,1,0,0],[1,1,1,0],[1,1,1,1]);    
return [
$nadi[$gg][$bb],$ax[$bb],$ax[$gg]];
}

function 
gun(){
            
$g=ceil($this->g/(800/60));
$b=ceil($this->b/(800/60));
$dev=array([17,7,5,22,27,15,13,1,8],[11,20,25,12,21,26,4,2,6],[10,9,23,18,19,24,16,3,14]);
$boys=array("God" => 0"man" => 1"monster" => 2);

$bo=array (=> "dev"=> "man"=> "monster");
foreach(
$dev as $k=>$v){
if (
in_array($g$v))
$gg=$k;
if (
in_array($b$v))
$bb=$k;
}
$gun=array(array(6,5,1),array(6,6,0),array(0,0,6));
return [
$gun[$gg][$bb], $bo[$bb], $bo[$gg]];
}

function 
naadi(){
            
$g=ceil($this->g/(800/60));
$b=ceil($this->b/(800/60));
$nadi=array([1,6,7,12,13,18,19,24,25],[2,5,8,11,14,17,20,23,26],[3,4,9,10,15,16,21,22,27]);    
$anadi=["Adi nadi""middle nadi""end nadi"];
foreach(
$nadi as $k=>$v){
if (
in_array($g$v))
$gg=$k;
if (
in_array($b$v))
$bb=$k;
}
if(
$bb == $gg)
    
$b=0;
else
    
$b8;

return [
$b$anadi[$bb], $anadi[$gg]];
}
}
Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Birth Info Edit
DoB2021-10-24
ToB21:13:23
PoBDelhi, IN
Transit Info Edit
Date2021-10-24
Time21:13:23
PlaceDelhi, IN