Created
January 8, 2013 20:11
-
-
Save jjjake/4487492 to your computer and use it in GitHub Desktop.
Return a list of AIT items without CDXs, older than one week (for handoff to auto_submit.php perpetual loop).
This file contains hidden or 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
| <? | |
| function get_data($url) { | |
| $ch = curl_init(); | |
| $timeout = 5; | |
| curl_setopt($ch, CURLOPT_URL, $url); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
| curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); | |
| $data = curl_exec($ch); | |
| curl_close($ch); | |
| return $data; | |
| } | |
| $last_week = date("Ymd", time() - 60 * 60 * 24 * 7); | |
| $metamgr_url = "http://www.us.archive.org/metamgr.php?f=exportIDs&w_identifier=archiveit*&w_mediatype=web&w_format=!*cdx*&w_collection=archiveit*&w_scandate=%3C".$last_week; | |
| echo get_data($metamgr_url); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment