/* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * Script name: saur2date.php ver 1.0.0 Description : This script is illustrates use of REST API that retrieves gregorian date information from the given Saur dinank. Written by: 27-Sep-2024 - Infotools Mostly developer will NOT need to change contents of this index.php script * * * Pre-requisite * * * Saur date must be given in ANSI format and digits and not in devnagari ank. Code review by: 27-Sep-2024 - Infotools Caution: 27-Sep-2024 - Infotools ver 1.0.0 Because this script is generated using proprietory code generator, changes in this script will need to be handled carefully. Giving valid Saur date in Ansi digi format is mandatory for this API call. Assumption: 27-Sep-2024 - Infotools Remarks: 27-Sep-2024 - Infotools date2saur API returns Saur date of the current date if the date parameter is not provided. This is not possible here as we can not retrieve today's Saur date by any built-in PHP function. * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * */ $sfn = "saur2date.php : "; $ans = null; $dDate = $_GET['ansidinank']; $ans = $_GET['show']; //echo $sfn.' dDate : '.$dDate.' show : '.$ans.'
'; if($dDate) { $url = "https://infotools.in/datelib/getdate.php?ansidinank=".$dDate."&UserId=1234".$ans; $response = file_get_contents($url); } else { $response = null; } // // following echo is for demo / debugging purpose only. Actual value is received in $response variable in json data format if($ans) { echo ' response json format :

'.$response.'
'; /* $aDateinfo = json_decode($response, true); echo $sfn.' aDateinfo
'; print_r($aDateinfo); */ echo '


Thanks for using saur2date API by infotools.in'; echo ''; echo '

to get API help visit भारतीय सौर दिनांक API help '; echo '

-- भारतीय सौर दिनांक आश्विन १ शके १९४६ 23 Sep 2024 ver 1.0.0'; }