Create a simple update check?

BlitzMax Forums/BlitzMax Beginners Area/Create a simple update check?

Grisu(Posted 2008) [#1]
Hi guys!

A. I'm looking for a simple update system like the one that comes with Crap Cleaner. You press a button and a html-page pops up which tells you that you're uptodate.



Do I need a special server to support such an output?
Is this done via html? Java? I have no clue... :(

B. In general: What would be the "easiest" way for an app to check if a newer version is available? What would you suggest.

C. Has someone already written a function that compares to version numbers? Like "1.2.333" is older than "1.4.999"?

As always: Thanks!

Grisu


grable(Posted 2008) [#2]
You do need a server somewhere, but it doesnt have to be a proper web server (although it would be alot easier to maintain imo)
Id use PHP as its everywhere these days, whatever farm you land on will probably support it.

Here is a crude version checker, using a lookup table.
Put this on a server and try out some versions numbers, eg:
/check.php?version=1.0.5
/check.php?version=1.2.0
etc...


Alternatively you could split the version string into its components and compare them one by one, but thats left as an exercise ;)


Grisu(Posted 2008) [#3]
Awesome, thanks Grable!

Seems like my freehost supports php. :)

1. Is there a way to "read" the output message from within a bmx app?

or

2. Can one output the message to a html template (so I can show it in the layout of my website)?


Otus(Posted 2008) [#4]
1. Is there a way to "read" the output message from within a bmx app?


Yeah, you need to read the web page and find the message on it. Check out BRL.HTTPStream module.

2. Can one output the message to a html template (so I can show it in the layout of my website)?


That's what PHP is for: just include the code into your template at the location you want it.


Grisu(Posted 2008) [#5]
Thanks!

Are there any good tutorials on how to start with php?
I'm a complete newbie to this. :(