registerXPathNamespace('dc', 'http://purl.org/dc/elements/1.1/'); $temp = $xml->xpath('/package/metadata/dc:date') ?: []; $publishedTimestamp = strtotime(array_shift($temp)); $sortedContentFiles[$publishedTimestamp] = $xml; } krsort($sortedContentFiles); $sortedContentFiles = array_slice($sortedContentFiles, 0, $rssLength); print("\n"); ?> Standard Ebooks - New Releases A list of the latest Standard Ebooks ebook releases, most-recently-released first. en-US https://creativecommons.org/publicdomain/zero/1.0/ http://blogs.law.harvard.edu/tech/rss /images/logo-rss.png Standard Ebooks - New Releases The Standard Ebooks logo 144 144 xpath('/package/metadata/dc:identifier') ?: []; $url = preg_replace('/^url:/ius', '', (string)array_shift($temp) ?? '') ?? ''; $url = preg_replace('/^https:\/\/standardebooks.org/ius', $webUrl, $url) ?? ''; $temp = $xml->xpath('/package/metadata/dc:title') ?: []; $title = array_shift($temp) ?? ''; $temp = $xml->xpath('/package/metadata/dc:creator') ?: []; $title .= ', by ' . array_shift($temp) ?? ''; $temp = $xml->xpath('/package/metadata/dc:description') ?: []; $description = array_shift($temp) ?? ''; $temp = $xml->xpath('/package/metadata/dc:date') ?: []; $published = gmdate('D, d M Y H:i:s +0000', strtotime(array_shift($temp) ?? '') ?: 0); $seSubjects = $xml->xpath('/package/metadata/meta[@property="se:subject"]') ?: []; ?> <?= $title ?>