This site (http://www.rthk.org.hk/rthk/news/expressnews/index_.html) provides update news (encode big5) , I want to extract the first 5 or 10 headlines (right hand column), can anyone show me a more neat/simple way (using preg_match_all) ??
<?php
function getnews()
{
$file = "http://www.rthk.org.hk/rthk/news/expressnews/index_.html";
$contents = file($file);
$size = sizeof($contents);
for($i = 0; $i < $size; $i++) {
$data = strip_tags($contents[$i]);
$alldata = $contents[$i];
if ($i == 296 || $i == 300 || $i == 304 || $i == 308 || $i == 312)
{ echo iconv("BIG5", "UTF-8", "$data <br>"); }
}
}
?>
[/COLOR]