Announcement
Collapse
No announcement yet.
Autocheck upon opening. Present message.
Collapse
X
-
It is indeed, you could use a combination of requests and echo to simply deploy a formatted XML formOriginally posted by Tone View PostAmazing.
Thanks :yes
of a table in an database so your application can process it. A nice alternative to using a MySQL
library or plugin. However, using PHP will be a bit less safe.
Leave a comment:
-
The echo commands displays that text that is within ' '. So then the HTTP.Submit grabs the text that echo is displaying and compares it with the string given in the program.
Leave a comment:
-
I can't understand which value it's using to set the query. If it's as simple as the version number i'll accept that.Originally posted by .74 View PostMaybe you can try encrypting the file or the text inside.
Or you can do what Centauri posted.
Then:PHP Code:<?php
#this is the current version of the Forged Alliance module
echo '2.0';
?>
endPHP Code:result = HTTP.Submit("http://www.mydomain.com/myscript.php", {}, SUBMITWEB_GET, 20, 80, nil, nil);
if result > "1.0" then
Dialog.Message("Blla", "There is a new update..blla");
Does the "echo" command query the MSI?
Leave a comment:
-
Maybe you can try encrypting the file or the text inside.
Or you can do what Centauri posted.
Then:PHP Code:<?php
#this is the current version of the Forged Alliance module
echo '2.0';
?>
endPHP Code:result = HTTP.Submit("http://www.mydomain.com/myscript.php", {}, SUBMITWEB_GET, 20, 80, nil, nil);
if result > "1.0" then
Dialog.Message("Blla", "There is a new update..blla");
Last edited by .74; 08-26-2010, 06:55 AM.
Leave a comment:
-
I was trying to use Centauri Soldier's code so instead of download the .txt/.php file it would be read. However I got error messages when using the code and I do not understand it to make changes.
Aside from the txt file, I am trying to add some security to my project. Here is what I am trying to do...
1. User wants to know if the current project he/she is using is a legit copy and not some 3rd party tampered project. So he click on a button.
2. This button contacts my server which compares a series of numbers and letters with a series of numbers and letters within the project.
3. If the numbers match it returns a window stating its legit. If they do not match it returns a window stating it is not legit.
I could use the same method with the code that .74 supplied but the txt file gets placed into the temp folder which if someone was smart enough would check and be able to see the series of numbers and letters thus security is breached. What needs to happen is when the comparing process happens, the .txt/.php file is not downloaded onto the users computer but instead compared with a file over the internet so intercepting these series of numbers and letters would be more difficult.
So the long awaited question would be...how can I use .74's code and make it work without downloading a file?
Thanks!
Leave a comment:
-
I made a mistake in my code.
It should be
..
if newversion > "1.0" then
...
Leave a comment:
-
Why download a file when you can just do a post (if you're using functions) or get (for a simple echo as described below) to a php file? Put the version number into a php file and use http post or get to echo back the file version to the program.
Here's an example of my php code for FAMM
Then I use this to get it in my AMS program.PHP Code:<?php
#this is the current version of the Forged Alliance module
echo '3.2.9.2';
?>
There's no need to download a file for something this simple. Plus, anytime you update your program, all you need to do is update the php file. Additionally, if you use the Project Action Plugin, it auto-increments internal version numbers for your program every time you preview it.Code:local sFileVersion = HTTP.Submit("http://www.mydomain.com/myscript.php", {}, SUBMITWEB_GET, 20, 80, nil, nil);Last edited by Centauri Soldier; 08-25-2010, 12:10 AM.
Leave a comment:
-
It's alive!!!
I took .74's code and mixed it with Cybergraph's code and got things squared away. It is working EXACTLY how I want it. Great work guys. I appreciate the help!
Leave a comment:
-
In your app insert a variable containing the version number (say: this_vers_numb = 1).
and set current_version_number to it then,then using HTTP.Download to fetch a very small text file from my web space containing nothing but the current version number...
and RTFM!Code:if this_vers_numb < current_version_number then -- do things here, for example display a dialog box announcing the presence of the updated version a ask the user if he want to update and so on... end
Leave a comment:
-
Let's take an example, I currently have the 1.0 version but there is a new version (2.0) out.
First make a .ini file and upload it to a webserver. Name it for example version.ini.
This is what the ini file should look like:
Then place this on the OnShow event, or in a Check for update button.[Information]
NewVersion=2.0
replace the mydomain.com with your website name. The 1.0 is the current version that the user has. Everytime you make a new version, update that. So when we download the 2.0 version that should be like:HTTP.Download("http://www.mydomain.com/version.ini", _TempFolder.."\\version.ini", MODE_BINARY, 20, 80, nil, nil, nil);
newversion = INIFile.GetValue(_TempFolder.."\\version.ini", "Information", "NewVersion");
if newversion == "1.0" then
Dialog.Message("New version detected", "A new version has been detected. You can download it on our webpage at www.mydomain.com");
File.Delete(_TempFolder.."\\version.ini", false, false, false, nil);
end
Also you have to update the ini file everytime you make a new version.if newversion == "2.0" then
--stuff
end
Good luck.Last edited by .74; 08-24-2010, 04:58 PM.
Leave a comment:
-
Exactly!
That is exactly what I am talking about! Awesome awesome! So here is what I am thinking...
1. Click on button. Button has code to contact server and compares a specific file which resides within the project and on the server.
How do I compare the files? After it compares how do I tell it to display a certain message depending on the outcome of the comparison?
Thanks
Leave a comment:
Leave a comment: