<?
   
if (isset($_GET['show'])) {show_source(ereg_replace("(^.+/|/)"""$_SERVER['PHP_SELF'])); exit;}
?>
<html>
<head>
<title>BBC Ticker</title>
</head>
<body bgcolor=black text=white link=yellow alink=red vlink=yellow>
<?
   $lines 
file("http://www.bbc.co.uk/tickerdata/story2.dat");
   foreach (
$lines as $line_num => $line) {
      if (
preg_match("/^HEADLINE /",$line)) {
         
$hl preg_replace('/^HEADLINE (.*)/','\1',$line);
      }
      if (
preg_match("/^URL http/",$line)) { 
         
$url preg_replace('/^URL (.*)/','\1',$line);
         echo 
"<a href=\"$url\">$hl</a><br>\n";
      }
   }
?>
</body>
</html>