Full-service Internet Marketing & Web Development
Recent Posts

Sponsors
![]() |
The Times newsfeedCode Wizard, 12-30-2006 |
This must be the simplest code ever for getting news headlines onto your site. The headlines are in English from the British newspaper, "The Times".
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>The Times News Headlines</title>
</head>
<body>
<?php
// The Times News Headlines
// This works as at 15-Aug-2000
// It may fail at any time if The Times changes its site layout!
//
$file = "http://www.the-times.com//message.txt";
$fd = @fopen($file, "r") or die ($file." cannot be accessed");
while (!feof($fd)) {
$buffer = fgets($fd, 4096);
strtr($buffer,"
","");
if (substr($buffer,0,6)<>"NOLINK")
{ echo $buffer."<br>
"; }
}
fclose($fd);
?>
<a href="http://www.the-times.co.uk/news/pages/resources/update1.n.html">
Click here</a>
</body>
</html>
|
|
Subscribe Now to receive new posts via Email as soon as they come out.
Comments
Post your comments

