I have this xml file:
<test time="11.11.20开发者_如何学Go11 11:11" >
<field type="one" value="10"/>
<field type="two" value="10"/>
</test>
and I would like to echo in php and save into DB each 15 mins (type, value). I have cron. So the site'll look like this:
Type: one | Value: 10
Type: two | Value: 10
Time: 11.11.2011 11:11
and after 15 mins:
Type: one | Value: 10
Type: two | Value: 10
Time: 11.11.2011 11:11
Type: one | Value: 10
Type: two | Value: 10
Time: 11.11.2011 11:26
I can't find the right way to write the code, so i'm asking for your help. Thank you ;)
Try out SimpleXML: http://de2.php.net/manual/en/book.simplexml.php
You have to use the XML Parser. More info: http://www.php.net/manual/en/example.xml-structure.php
精彩评论