Last active
December 31, 2015 21:19
-
-
Save ericthelast/8045963 to your computer and use it in GitHub Desktop.
Using param to get bible reading plan
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 | |
$markup = ''; | |
$url = '';//putz the url here | |
$last_timestamp = param_get('jnet5_bible_reading_timestamp'); | |
if ($last_timestamp < strtotime("-60 minutes")) { | |
$markup = file_get_contents($url); | |
if (strlen($markup)) { | |
param_set('jnet5_schedule_range_markup', $markup); | |
param_set('jnet5_bible_reading_timestamp', time()); | |
} else { | |
watchdog('jnet5', 'Could not retrieve bible reading for today'); | |
} | |
} | |
// Use $markup in your markup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment