initial commit

This commit is contained in:
2017-10-10 14:11:20 +01:00
commit c1641bda46
18 changed files with 1057 additions and 0 deletions

11
rss-science.php Normal file
View File

@@ -0,0 +1,11 @@
<?php
header('Content-Type: text/xml');
$sUrl = 'http://www.sciencemag.org/rss/current.xml';
$oXml = new SimpleXMLElement(file_get_contents($sUrl));
for ($i = count($oXml->item) - 1; $i >= 0; --$i) {
$oItemXml = $oXml->item[$i];
if (strpos($oItemXml->title, 'Chemistry:') === false) {
unset($oXml->item[$i]);
}
}
echo $oXml->asXML();