Thursday, 26 February 2015

I am creating and storing xml file



I have written code in php to create and store xml file aromatically to given path but all the time I need to select path and then save.


Am I missing something here in my code.


header("Content-Type: text/xml");



<?php
header("Content-Type: text/xml");
header("Content-Disposition: attachment; filename=".basename("example.xml"));
header("Content-Transfer-Encoding: binary");
echo '<results><copyright>Copyright (c) 2015 Systango, Ltd.</copyright><symbolcount>1</symbolcount><quote symbolstring="php" datatype="equity option" entitlement="NA" datetime="2015-02-26T02:29:01-05:00"><key><symbol>PHP</symbol><exchange>IND</exchange></key><pricedata><last>2113.86</last><change>-1.62</change><changepercent>-0.076578</changepercent><tick>0</tick><open>2115.30</open><high>2119.59</high><low>2109.89</low><prevclose>2115.48</prevclose><bid>2104.58</bid><ask>2120.08</ask><bidsize>0</bidsize><asksize>0</asksize><contractvolume>0</contractvolume><lasttradedatetime>2015-02-25T16:00:00-05:00</lasttradedatetime></pricedata><contract/></quote></results>';

?>

No comments:

Post a Comment