Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Aug 2008
    Posts
    12

    Small Simple AutoUpdate Check (PHP)

    <?
    require_once('./global.php');

    $doupdate = '1.0';

    $query = sprintf("SELECT * FROM `loaderupdate` where doupdate= '1.0'",
    mysql_real_escape_string($doupdate));

    $result = mysql_query($query);
    if (!$result) {
    $message = 'Invalid query: ' . mysql_error() . "\n";
    $message .= 'Whole query: ' . $query;
    die($message);
    }
    while ($row = mysql_fetch_assoc($result)) {
    echo $row['doupdate'];
    }
    mysql_free_result($result);
    ?>
    in mysql you just have text table loaderupdate where u manually put value.

    so now, loader check for update

    // THIS PART IS MFC
    CString sURL, sLoader, sResult, sParams, sEncrypt;
    sParams.Format( "doupdate=%s", sLoader.GetString( ) );
    sURL.Format( "yourpath" );
    CWebAccess CWeb;
    CWeb.Post( sURL.GetString( ), sParams, sResult );
    if ( strstr ( sResult.GetString( ), "1.0" ))
    {
    AfxMessageBox( "\n Loader Update!\n Press OK And Wait",MB_ICONWARNING|MB_OK);
    DoUpdate ( );//DoUpdate is software downloader and overwrite code wich im not giving
    }
    else if ( strstr ( sResult.GetString( ), "" ))
    {
    }

    maybe not the best way but working way so thats it.

  2. #2

    Re: Small Simple AutoUpdate Check (PHP)

    Looks good man!

    Have some rep eh?


Similar Threads

  1. WnX 64 small problem
    By HermanETH32 in forum ETH32
    Replies: 0
    Last Post: July 13th, 2010, 18:33
  2. Small Pack
    By Zenturion in forum Skins, Mods & Maps
    Replies: 3
    Last Post: June 26th, 2010, 00:44
  3. Simple etPro AC detection check
    By King-OrgY in forum Anti-Cheat
    Replies: 2
    Last Post: April 9th, 2010, 07:28
  4. Some small help please
    By rentagoth in forum Basics
    Replies: 1
    Last Post: July 9th, 2009, 14:20

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •