Skip to content

Instantly share code, notes, and snippets.

@ericthelast
Last active December 31, 2015 21:19
Show Gist options
  • Save ericthelast/8045963 to your computer and use it in GitHub Desktop.
Save ericthelast/8045963 to your computer and use it in GitHub Desktop.
Using param to get bible reading plan
<?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