Skip to content

slu000uls/Time-Api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Time API

⚙️ Download this rep

Note: Make Sure To Download jdf.php.

Example Usage

<?php
error_reporting(0);
include_once ("jdf.php");
date_default_timezone_set('Asia/Tehran');
header('content-type:application/json;charset=utf-8');

$timep = date('H:i:s');
$time1p = strtotime($timep);
$time1p -= 3600;
$new_timep = date('H:i:s', $time1p);

$todayp = jdate('l');
$fslp = jdate('f');
$monthp = jdate('F'); 
$Animalp = jdate('q'); 
$englishdatep = date('Y/m/d'); 
$daytoyearp = jdate('z'); 
$irandatep = jdate('y/m/d'); 
$mororafterp = jdate('A'); 
$results[] = [
'time'=>$new_timep,
'irandate'=>$irandatep,
'englishdate'=>$englishdatep,
'today'=>$todayp,
'Animal'=>$Animalp,
'fsl'=>$fslp,
'month'=>$monthp,
'daytoyear'=>$daytoyearp,
'morning-or-afternon'=>$mororafterp,
'timezone'=>'Asia/Tehran'
];
$json = ['ok'=>true,'channel'=>'@devsgit','Writer '=>'Soheil | @slu000uls','results'=>$results];
echo json_encode($json,448);
?>

Now you have api and you can use it Telegram Robot | Websites Or Other Thing...

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages