Created
February 23, 2023 18:50
-
-
Save brianglass/ca92f3210e273cf161542bf760f33e84 to your computer and use it in GitHub Desktop.
PHP Orthocal Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Get today's information | |
$json = file_get_contents('https://orthocal.info/api/gregorian/'); | |
$day = json_decode($json); | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Daily Readings</title> | |
</head> | |
<body> | |
<h1><?= $day->summary_title ?></h1> | |
<h2>Scripture Readings</h2> | |
<?php foreach ($day->readings as $reading): ?> | |
<h3><?= $reading->display ?></h3> | |
<?php foreach ($reading->passage as $verse): ?> | |
<p> | |
<sup><?= $verse->verse ?></sup> | |
<?= $verse->content ?> | |
</p> | |
<?php endforeach; ?> | |
<?php endforeach; ?> | |
<h2>Commemorations</h2> | |
<?php foreach ($day->stories as $story): ?> | |
<h3><?= $story->title ?></h3> | |
<?= $story->story ?> | |
<?php endforeach; ?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment