$hits = mysql_query("SELECT `url` FROM `hits` GROUP BY `url`");
most likely it is this line causeing your error on line 5.
your table name isn't something like undergroundnews_hits is it? If so you need to
$hits = mysql_query("SELECT `url` FROM `undergroundnews_hits` GROUP BY `url`");
use something like the above. If you have php My Admin it will tell you the full table name. if you want to use telnet, or ssh or command line http://www.undergroundnews.com/cgi-bin/ubbcgi/ultimatebb.cgi?/topic/9/81.html
Might want to try your query in ther to test it before you run the script just to prove it out.