Kundli Pro can be accessed through cURL as per example below.
<?php
//debug
error_reporting(E_ALL);
ini_set('display_errors', 1);
//debug end
$url = "https://kundlia.jyotishapi.com";
$userid = 'client_id';
$token = 'client_tokan';
$headers = array(
'Method: GET',
'Authorization: Basic '. base64_encode($userid.':'.$token)
);
$curl = curl_init();
$fields = array(
'birthdate' => $_POST["birthdate"],
'birthtime' => $_POST["birthtime"],
'birthlongitude' => $_POST["birthlongitude"],
'birthlatitude' => $_POST["birthlatitude"],
'birthtimezone' => $_POST["birthtimezone"]
);
$fields_string = http_build_query($fields);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, TRUE);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_POSTFIELDS, $fields_string);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
/*
echo "<pre>";
echo $response;
echo "</pre>";
*/
$data = json_decode($response);