Announcement

Collapse
No announcement yet.

Autocheck upon opening. Present message.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tone
    replied
    Thanks mate

    Leave a comment:


  • Imagine Programming
    replied
    Originally posted by Tone View Post
    Amazing.
    Thanks :yes
    It is indeed, you could use a combination of requests and echo to simply deploy a formatted XML form
    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:


  • Tone
    replied
    Originally posted by .74 View Post
    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.
    Amazing.
    Thanks :yes

    Leave a comment:


  • .74
    replied
    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:


  • Tone
    replied
    Originally posted by .74 View Post
    Maybe you can try encrypting the file or the text inside.
    Or you can do what Centauri posted.
    PHP Code:
    <?php
    #this is the current version of the Forged Alliance module
    echo '2.0';
    ?>
    Then:
    PHP Code:
    result HTTP.Submit("http://www.mydomain.com/myscript.php", {}, SUBMITWEB_GET2080nilnil);
    if 
    result "1.0" then
    Dialog
    .Message("Blla""There is a new update..blla"); 
    end
    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.
    Does the "echo" command query the MSI?

    Leave a comment:


  • .74
    replied
    Maybe you can try encrypting the file or the text inside.
    Or you can do what Centauri posted.
    PHP Code:
    <?php
    #this is the current version of the Forged Alliance module
    echo '2.0';
    ?>
    Then:
    PHP Code:
    result HTTP.Submit("http://www.mydomain.com/myscript.php", {}, SUBMITWEB_GET2080nilnil);
    if 
    result "1.0" then
    Dialog
    .Message("Blla""There is a new update..blla"); 
    end
    Last edited by .74; 08-26-2010, 06:55 AM.

    Leave a comment:


  • ComputerNerd
    replied
    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:


  • Tone
    replied
    Great thread thank you all.
    I'll be reading that again!

    Leave a comment:


  • Tone
    replied
    Great thread thank you all.
    I'll be reading that again!

    Leave a comment:


  • .74
    replied
    I made a mistake in my code.
    It should be
    ..
    if newversion > "1.0" then
    ...

    Leave a comment:


  • Centauri Soldier
    replied
    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
    PHP Code:
    <?php
    #this is the current version of the Forged Alliance module
    echo '3.2.9.2';
    ?>
    Then I use this to get it in my AMS program.

    Code:
    local sFileVersion = HTTP.Submit("http://www.mydomain.com/myscript.php", {}, SUBMITWEB_GET, 20, 80, nil, nil);
    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.
    Last edited by Centauri Soldier; 08-25-2010, 12:10 AM.

    Leave a comment:


  • ComputerNerd
    replied
    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:


  • Cybergraph
    replied
    In your app insert a variable containing the version number (say: this_vers_numb = 1).

    then using HTTP.Download to fetch a very small text file from my web space containing nothing but the current version number...
    and set current_version_number to it then,
    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
    and RTFM!

    Leave a comment:


  • .74
    replied
    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:
    [Information]
    NewVersion=2.0
    Then place this on the OnShow event, or in a Check for update button.
    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
    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:
    if newversion == "2.0" then
    --stuff
    end
    Also you have to update the ini file everytime you make a new version.

    Good luck.
    Last edited by .74; 08-24-2010, 04:58 PM.

    Leave a comment:


  • ComputerNerd
    replied
    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:

Working...
X