\n"; $xml .= "\n"; $xml .= "\n"; $xml .= "Calgary Scrabble Group - Weekly Stars\n"; $xml .= "http://www.calgary374.org/\n"; $xml .= "Weekly top 3 players at the Calgary Scrabble Group's weekly club meeting.\n"; $xml .= "" . date("r") . "\n"; $xml .= "en-us\n"; return $xml; } function write_item($date, $result) { $xml = ''; $xml .= "\n"; $xml .= "" . date('F jS, Y', strtotime($date)) . "\n"; $url = "http://www.calgary374.org/DailySummaryPage.php?date=" . $date; $xml .= "" . $url . "\n"; $xml .= "" . $url . "\n"; //$xml .= "" . $row["date"] . " " . date('O') . "\n"; $xml .= "\n"; } $xml .= "]]>\n"; $xml .= "\n"; return $xml; } function write_footer() { $xml = ''; $xml .= "\n"; $xml .= "\n"; return $xml; } header('Content-type: text/xml'); f_connect(); $result = f_run_query("rs_max_date_list"); $dates = get_dates($result); mysql_free_result($result); $xml = ''; $xml .= write_header(); foreach ($dates as $date) { $result = f_run_query("rs_daily_stars_1", array("date"=>$date)); $xml .= write_item($date, $result); mysql_free_result($result); } f_disconnect(); $xml .= write_footer(); print $xml; ?>