- 12 mar 2010, 19:18
#20945
Ik heb 't even aangepast en met wat css, zie ook http://www.hetweerinalkmaar.nl/knmi3.php
gr
Theo
Code: Selecteer alles
<html>
<head>
<title>KNMI</title>
<style type="text/css">
div.weer {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 13px;
width: 700px;
color: #000000;
background-color: #FFF;
padding: 10px;}
div.rubriekkop {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 17px;
color: #000080;
font-weight: bold;}
</style>
</head>
<body>
<div class="rubriekkop">
<?
echo "<b> De Weersverwachting van het KNMI geldig tot morgen middernacht</b> <br><br>";
?>
</div>
<div class="weer">
<?
setlocale(LC_ALL, 'nl_NL.ISO_8859-1');
if (file_exists('ftp://ftp.knmi.nl/pub_weerberichten/basisverwachting.xml'))
{$xmlo = simplexml_load_file('ftp://ftp.knmi.nl/pub_weerberichten/basisverwachting.xml');
$kop = $xmlo->xpath("//field_content");
echo $kop[0],"<br />";
echo $kop[2],"<br /><br />";
$tijd = $xmlo->xpath("//report_dtg_issued"); echo strftime("%A, %e %B %Y %H:%M", strtotime($tijd[0]))," uur";
}
?>
</div>
</body>
</html>
gr
Theo