Page 1 of 1
PHP Server check for application updates
Posted: Tue Jun 28, 2011 2:37 pm
by MrGibbage
I have some applications that I have written in C#, and I host them on my personal website. I would like to put some code in my C# applications that would check a server to see if that is the latest version of the application. I figured this wouldn't be too hard to do in PHP, but I would still like to see what is out there first. However, this is a really hard thing to search for. Anyone seen any decent PHP scripts for such a thing?
Re: PHP Server check for application updates
Posted: Tue Jun 28, 2011 2:52 pm
by Celauran
Can't imagine it would be terribly difficult. Assuming you've got a database table containing the names of your apps and their latest versions, maybe have the app send an XML POST to the server containing the name and version of the application sending the request, use that information to query the database, then send back a response as to whether or not an update is available.
Re: PHP Server check for application updates
Posted: Tue Jun 28, 2011 3:10 pm
by MrGibbage
Yeah, that's pretty much what I was going to do tonight, but I figured if someone had already done it, perhaps with a handful of configuration options that I hadn't thought of, then why not. But yeah, this shouldn't be too hard at all.
Re: PHP Server check for application updates
Posted: Wed Jun 29, 2011 9:36 am
by MrGibbage
Well, I did decide to just do it up myself. In case someone finds this thread in search of a similar solution, I did put a post on my blog with the code to make it work.
http://skipstechtalk.net/2011/06/29/che ... t-version/
Re: PHP Server check for application updates
Posted: Wed Jun 29, 2011 12:17 pm
by pickle
That's an awful lot of work. The simplest solution would be to simply create a file that contains the latest version. Then, rather than worry about parsing XML, you just read the contents of the file. The work the server has to do is much less as well (no PHP invocation, no database querying)