'https://41777481cd544760a16718e4f8bb8d02@sentry.io/1449378' ]); header('Content-type: text/xml'); include("../../functions/funct_xml_special_characters.php"); include("../../functions/funct_shorten_text.php"); $publish_date = date("r", time()); //set the publish date //create rss feed (xml) for TOP CLUBS $new_xml = " Top Clubs - Terrace Chants https://www.terracechants.me.uk The Top Rated Clubs within Terrace Chants. "; include("../../dbsettings/db_connect.php"); $get_club_chants_sql = "SELECT club, count(club) as club_total, ROUND(SUM(totalscore)/SUM(votes)) as average FROM trc_chants WHERE club NOT LIKE '' GROUP BY club ORDER BY average DESC, club_total DESC, club ASC LIMIT 10"; $club_chants = $dbh->query($get_club_chants_sql)->fetchAll(); foreach ($club_chants as $club_chant) { $club = stripslashes($club_chant[0]); $lnk = 'https://www.terracechants.me.uk/club/chants/'.urlencode(stripslashes($club_chant[0])); $desc = 'See Football Chants for '.stripslashes($club_chant[0]).". Rating: " . $club_chant[2] . " - (" . $club_chant[1] . " "; if ($club_chant[1] == 1) { $desc .= 'chant)'; } else { $desc .= 'chants)'; } $new_xml = $new_xml. " ".htmlentities($club)." ".htmlentities($club_chant[1])." ".$lnk." ".$publish_date." ".htmlentities($desc)." "; } $new_xml = $new_xml. " "; print $new_xml;