Zurück


Der Quellcode dazu


loadHTML($unwetter_html); 
// letzte aktuzaliesiereung
$wann = $oDom->getElementById( 'wettertab' ); 
$ee=$wann->getElementsByTagName('p')->item(0)->nodeValue; 
echo $ee;

// landkreis
echo "";
*/
$oDom = new DOMDocument;
@$oDom->loadHTML($unwetter_html); 
$e=0;



$r=0;
$oDomElement = $oDom->getElementsByTagName( 'h2' ); 
foreach ($oDomElement as $oDomNode1 ) {
 echo $e.' = '.$oDomNode1->nodeValue;
echo "
"; $ee=$oDom->getElementsByTagName('table')->item($e)->getElementsByTagName('td');//->nodeValue; //$ee1=$oDom->getElementsByTagName('td'); echo ""; foreach ($ee as $td ) { echo "$r"; if($r%=4){ echo"\n"; } $r++; } $e++; echo "
$td->nodeValue
\n\n


"; } /* $table = $oDomNode->getElementsByTagName( 'table' ); foreach ($table as $oDomNode1 ) { echo $oDomNode1>item($e)->nodeValue.'


'; } */ //var_dump($oDomElement); /* @$document = new DOMDocument(); @$document->loadHTML($unwetter_html); $path = new DOMXPath($document); $urls = $path->evaluate("/html/body//h1"); for ($x = 0; $x < $urls->length; $x++) { $hrefs[$x] = $urls[$x]->innerHTML;//getAttribute('src'); var_dump($hrefs); // echo $hrefs[$x]; //echo $urls->item($x)->removeAttribute('src'); } $path->saveHTML(); echo $path; $xmlDoc = new DOMDocument(); $xmlDoc->loadHTML("http://www.wettergefahren.de/DWD/warnungen/warnapp/warnings.html"); $x = $xmlDoc->documentElement; foreach ($x->childNodes AS $item) { print $item->nodeName . " = " . $item->nodeValue . "
"; } */ ?>

Add Comment

* Required information
1000

Comments (1)

Gravatar
Admin
Sascha65says...

Die Canvas Balken Uhr ist ja mal Fett