automatically db detail is update on my xml file without refresh page

ZEPBAPANITA

New Member
I'm trying to refresh the xml feed automatically? Is there a way to do it?I've done some php coding(from mysql database) to generate an xml feed, I'll keep this xml link on one of my websites to display content.but I'm updating the data for xml feed regularly.Is the content automatically refreshes on the webpages when ever I add new content on my mysql database?Please help.. EDIT : for adding code part \[code\] $catname=func_query_first_cell("select status from $sql_tbl[orders] where status='Q'"); $file= fopen("orderdetails.xml", "w"); $_xml ="<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\r\n"; $_xml .="\t<Feed>\r\n"; $_xml .="\t<order>\r\n"; $_xml .="\t<status>" .htmlspecialchars($catname,ENT_QUOTES). "</status>\r\n"; $counterr=0; $r=func_query("select * from $sql_tbl[orders] "); foreach($r as $n) {$products=func_query_first("select * from $sql_tbl[orders] where status='Q'"); $products=func_query_first("select product from $sql_tbl[order_details] where orderid=$n[orderid]"); $infeed_counter++; if($row[avail]>0) $avail='Y'; else $avail='N'; $_xml .="\t<Order>\r\n"; $_xml .="\t<orderid>" .$n[orderid]. "</orderid>\r\n"; $_xml .="\t<login>" . htmlspecialchars(strip_tags(substr($n[login],0,50)) , ENT_QUOTES ). "</login>\r\n"; $_xml .="\t<total>" . $n[total]. "</total>\r\n"; $_xml .="\t<product>" . $products[product]. "</product>\r\n"; $_xml .="\t</Order>\r\n"; } $_xml .="\t</order>\r\n"; $_xml .="\t</Feed>\r\n"; fwrite($file, $_xml); fclose($file); echo "XML version of products available here with $infeed_counter products. <a href=http://stackoverflow.com/"orderdetails.xml?page=$page\">View the XML.</a>";\[/code\]exit;?>Now i got the xml feed is:\[code\] <Feed> <order> <status>Q</status> <Order> <orderid>1</orderid> <login>krishna</login> <total>399.99</total> <product>Designing Web Usability</product> </Order> <Order> <orderid>65</orderid> <login>krishna</login> <total>399.99</total> <product>Three Stone Princess Cut Diamond Ring</product> </Order> <Order> <orderid>2</orderid> <login>krishna</login> <total>34.65</total> <product>Three Stone Princess Cut Diamond Ring</product> </Order>\[/code\]
 
Back
Top