Scoopr - <?php echo $head; ?> http://www.scoopr.net Scoopr gathers news from over 4,000 sources and analyzes them. The articles in this feed are the ones currently getting the most press across the globe. en Scoopr http://www.scoopr.net http://www.scoopr.net/images/logorss.gif connect(); $query = "SELECT word, COUNT(*) AS count FROM hotwords WHERE timestamp > '".$yesterday."' ".$section." GROUP BY word ORDER BY count DESC LIMIT 20"; $result=mysql_query($query) or die("Error: couldn't execute: ($query)"); $conn->close(); while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $word=mysql_escape_string($row['word']); // Get relevant articles for each hot word. $conn = new db; $conn->connect(); $query2 = "SELECT *, MATCH (title, article, tag) AGAINST ('$word') AS score FROM articles WHERE MATCH (title, article, tag) AGAINST ('$word') AND timestamp > '".$yesterday."' LIMIT 1 "; $result2=mysql_query($query2) or die(mysql_error()); $conn->close(); // Display article and link. while($row2 = mysql_fetch_array($result2, MYSQL_ASSOC)) { $id=$row2['id']; $title=htmlentities(strip_tags($row2['title'])); $article=htmlentities(strip_tags($row2['article'])); $pubdate=$row2['pubdate']; $pubdate=date('r', strtotime($pubdate)); } // Check for duplicate $dup++; $i=0; $dupstop=1; while($i <= $dup) { if ($duplicate[$i]==$id) { $dupstop=0; } if ($duplicatetitle[$i]==$title) { $dupstop=0; } $i++; } $duplicate[]=$id; $duplicatetitle[]=$title; if ($dupstop==0) { } else { echo ' '.$title.' http://www.scoopr.net/alpha/?page=showarticle&aid='.$id.' http://www.scoopr.net/alpha/?page=showarticle&aid='.$id.' '.$pubdate.' '.$article.' '; } } ?>