"Ad server hostnames", 'description' => 'A list of ad server hostnames for use in blocking ads', 'link' => 'http://pgl.yoyo.org/adservers/', 'webmaster' => 'pgl@yoyo.org', 'language' => 'en-GB', 'imgurl' => 'http://pgl.yoyo.org/images/mozzie-beer.jpg', ); // item fields $itemfields = array( 'id' => 'hostname', // id field in db 'description' => 'hostname', // field with main content 'date' => 'date_added', // datestamp for item 'title' => 'hostname', // item subject / title ); // item vars $itemvars = array( 'baseurl' => 'http://pgl.yoyo.org/adservers/details.php', // beginning of url to full details 'maxdesclen' => 75, // max length of content 'dateformat' => 'D M jS H:i', // not sure if this is used? ); // do the query $sql = 'select *' . ' from adservers' . ' where valid = 1' . ' order by date_added desc' . " limit $limit"; $result = mysql_query($sql); echo db_error(); // prepare the list of items $items = prepare_rss_items($result, $itemfields, $itemvars); // output the rss output_rss($channel, $items); ?>