<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- $Id: TestSlashHeadlines.php,v 1.1 2001/03/09 23:14:06 sandipb Exp $ -->
<html>
<head>
<title>sandipb.net: Welcome</title>
</head>
<body bgcolor="white">
<p align="center">
<font face="helvetica" color="maroon">
<h1><i> SlashDot Headlines </i></h1>
</font>
</p>
<?php
include "SlashHeadlines.php";
$sh = new SlashHeadlines();
$status= $sh->update();
if ($status){
$n= $sh->get_num_stories();
print "<p><TABLE align=\"center\" border=\"1\" bordercolor=\"black\">";
for ($i=0;$i<$n;$i++){
print "<TR>";
print "<TH bgcolor=\"#f0f0f0\">".$sh->stories[$i]->section.": <A href=\"".$sh->stories[$i]->url."\">".$sh->stories[$i]->title."</A></TH>";
print "</TR>";
print "<TR><TD>";
print "<IMG align=\"right\" src=\"".$sh->stories[$i]->image."\" >";
print "Posted by <B>".$sh->stories[$i]->author."</B> on <I>".$sh->stories[$i]->time."</I></BR>";
print "From the <B>".$sh->stories[$i]->department."</B> department</BR>";
print $sh->stories[$i]->comments." comments till now.";
print "</TD></TR>";
}
print "</TABLE></p>";
print "<p align='center'><small><I>Last updated: ".$sh->get_last_update()."</I></small></p>";
} else {
print "An error occured while fetching the SlashHeadlines.";
}
?>
</p>
</body>
</html>
|