<? //Set the content-type header to xmlheader("Content-type: application/xml");//echo the XML declarationecho chr(60).chr(63).'xml version="1.0" encoding="iso-8859-1" '.chr(63).chr(62);function my_nl2br ($str) {//$str = preg_replace('#\r?\n#', '<br />', $str);//$str=str_replace('"',"'",$str);return($str);}// open data baseinclude("../scripts/open_db.php");//include ("../includes/scripts/text_functions.php");	// get all current news items not archived $result = mysql_query("SELECT title,link,headline,intro,day,card_id FROM cards ORDER BY day DESCLIMIT 1,7 "  ); ?><rss version="2.0">   <channel>    <title>My Daily Tarot</title>    <link>http://www.tarotcardmeaning.info</link>    <description>A daily Tarot card and it's interpretation for every day of the year</description>  <?  // get details for this news item while ( $myrow = mysql_fetch_row($result) ) { $name =$myrow[0];$link =$myrow[1];$headline =$myrow[2];$intro =my_nl2br ( trim  ($myrow[3]));$day =$myrow[4]; $card_id =$myrow[5];  $link = $link.".htm"; $date =  date('r', ($day * 60 * 60 * 24) + 300); //$date  =substr(date ("l",$date) ,0,3).date (" jS M y",$date);$rss_text = $intro;?>      <item>       <title> <? echo $name." - ".$headline ?></title>       <link>http://www.tarotcardmeaning.info/meaning/<? echo $link ?></link>       <description><? echo $rss_text ?></description> 	   <guid>http://www.tarotcardmeaning.info/meaning/<? echo $link ?></guid>   		<pubDate><? echo $date ?></pubDate>    </item>	<? }  ?>             </channel></rss>
