Waarom werkt dit script niet meer
file: news.php
<?
//lees de file in in een string
$strNuNL=implode("",file("http://nu.nl/deeplink_xml"));
$strNuNL=preg_replace("/\n/","",$strNuNL);
//haal de sectie economie.hoofd op
preg_match("/<section name=\"nieuws.hoofd\">(.*?)<\/section>/",
$strNuNL,$arrEconomieHoofd);
//preg_match("/<section name=\"economie.hoofd\">(.*?)<\/section>/",
//splits de headlines
$arrDocumenten=explode("</document>",$arrEconomieHoofd[1]);
//uitvoer naar browser in de vorm van een tabel
?>
<table>
<?
for($i=0;$i<count($arrDocumenten);$i++)
{
preg_match("/href=\"(.*?)\">(.*)/",$arrDocumenten[$i],$arrOut);
//de href staat nu in $arrOut[1] en de tekst in $arrOut[2]
?>
<tr>
<td><a href="<?=$arrOut[1]?>"><?=$arrOut[2]?></a></td>
</tr>
<?
}
?>
</table>

Likes:

Quote