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

26 lines
No EOL
842 B
PHP

<?php
error_reporting(E_ALL); ini_set('display_errors',0);
//-------------------------------------------------------------------------------------------------------------
$page='https://www.benzinpreis-aktuell.de/tanken-bft-tankstelle-leipzig-04347-3b75.html'; $child=''; $node=''; $innerHTML= '';
$tag='div-2 preisC';
$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) {
$tanke11 .= $child->ownerDocument->saveXML( $child );
}
$template->assign('open', 1);
$template->assign('tanke', $tanke11);
$template->assign('content', 'tpl/ajax/tanke.tpl');
?>