LemonInflux Posted January 20, 2008 Share Posted January 20, 2008 I'm creating some software, and on it I have an XML-controlled updater. Within the XML file, I have blocks like this: <updates> <update> <title>Update</title> <author>Bob</author> <desc>A short description</desc> <nfile>file.php</nfile> <path>http://www.mysite.com/update.txt</path> </update> </updates> This works fine. On the control panel screen, it looks like this: Update by Bob A short description. Files to be updated: file.php ------- However, I've discovered some problems. Every time someone goes to check for updates, all updates are installed, even if they have been already, which can cause some conflicts. So, I need to think of some kind of way to, in effect, 'check' the new updates, and install them from oldest to most recent. To do this, I considered a system whereby the user has an xml file, and a php script gets new updates from my site and puts it into their XML, the only difference between mine and theirs being theirs will have another tag within the <update></update>: <installed></installed> This will have yes or no. This will tell the php whether or not to update/install updates. So, my question to you is, what's the easiest way of doing this? Does anyone have any better ideas? Or, if not, any idea how I'd go about this? I thought about fwrite, but there'd need to be a way to distinguish between each block, and I thought there might be some php xml commands that could help me with this. Thanks in advance, Tom. Quote Link to comment https://forums.phpfreaks.com/topic/86954-xmlphp-help/ Share on other sites More sharing options...
LemonInflux Posted January 23, 2008 Author Share Posted January 23, 2008 BUMP. Quote Link to comment https://forums.phpfreaks.com/topic/86954-xmlphp-help/#findComment-447177 Share on other sites More sharing options...
GingerRobot Posted January 23, 2008 Share Posted January 23, 2008 and I thought there might be some php xml commands that could help me with this. If you're using php 5: www.php.net/simplexml - i think example 9 is what you're after. Otherwise: www.php.net/xml Must admit, i didn't read the whole post, but it might point you in the right direction. Quote Link to comment https://forums.phpfreaks.com/topic/86954-xmlphp-help/#findComment-447289 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.