wright67uk Posted May 2, 2013 Share Posted May 2, 2013 I have an xml feed; http://whdn.williamhill.com/pricefeed/openbet_cdn?action=template&template=getHierarchyByMarketType&classId=2&marketSort=--&filterBIR=N It's really quite unreliable and this is what I would like to do... read the xml file at 5 minute intervals. If the xml is available then save the data to an sql table (MySql) If the xml is not available then keep trying to read MySql table if the data already exists. Whilst I appreciate this is something I need to read up on, is there anybody experienced with XML and PHP skills, that could give me a few pointers please? Quote Link to comment Share on other sites More sharing options...
lemmin Posted May 2, 2013 Share Posted May 2, 2013 simplexml_load_string() would be the place to start. You should be able to load your xml data into an iterative object pretty easily: $xml = file_get_contents('http://whdn.williamhill.com/pricefeed/openbet_cdn?action=template&template=getHierarchyByMarketType&classId=2&marketSort=--&filterBIR=N'); $data = simplexml_load_string($xml); Quote Link to comment Share on other sites More sharing options...
wright67uk Posted May 3, 2013 Author Share Posted May 3, 2013 Just what I was looking for. Thankyou. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.