jb-data.de/monitor/scripts/ajax/covid.php
2025-08-11 22:23:30 +02:00

34 lines
No EOL
983 B
PHP

<?php
error_reporting(E_ALL); ini_set('display_errors',0);
//-------------------------------------------------------------------------------------------------------------
$page='https://hotspotornot.de/s/Leipzig'; $child=''; $node=''; $html= '';
$tag='Header__Wrapper-sc-1lkmh1x-1 bdBQKM';
$html3 = file_get_contents($page);
mb_convert_encoding($html,"UTF-8","auto");
$xp3 = new DOMDocument();
$xp3->loadHTML($html3);
$xp3 = new DOMXPath($xp3);
foreach($xp3->query("//div[@class='".$tag."']") as $node) {
$node->nodeValue;
break;
};
$children = $node->childNodes;
foreach ($children as $child) {
$tanke1 .= $child->ownerDocument->saveXML( $child );
}
// Einlesen der gesamten Seite in ein Array
$lines = file ("http://www.spiegel.de/schlagzeilen/");
for ($i = 227; $i <= 327; $i++) {
$bereinigt = strip_tags($lines[$i],"");
echo $bereinigt."
\n";
}
?>
// $template->assign('tanke', $tanke1);
// $template->assign('content', 'tpl/ajax/covid.tpl');
?>