function cron_news() { include 'scrapers/curl_new_news.php'; $post_id = get_option('latest_news_id') + 1; $post_end = $post_id + 2; while ($post_id <= $post_end) { $url = 'http://www.prescott-az.gov/news/index.php?id=' . $post_id; print curl_news_scrape($url, $post_id); $post_id++; } }
require_once ABSPATH . 'wp-admin/includes/image.php'; require_once ABSPATH . 'wp-admin/includes/file.php'; require_once ABSPATH . 'wp-admin/includes/media.php'; if (isset($_POST['Submit'])) { include '../wp-content/themes/city-of-prescott-tabula-rasa/inc/scrapers/curl_new_news.php'; $post_id = $_POST['post_id']; $post_end = $_POST['post_end']; if (empty($post_id)) { $post_id = 1; } if (empty($post_end)) { $post_end = $post_id + 20; } while ($post_id <= $post_end) { $url = 'http://www.prescott-az.gov/news/index.php?id=' . $post_id; print curl_news_scrape($url, $post_id); $post_id++; } } else { // If Not submitted ?> <?php global $network_admin, $form_action; $network_admin = 0; ?> <form name="export" action="<?php echo $_SERVER['PHP_SELF']; ?> " method="post"> <div class="selection_criteria" >