Launcher Problem

Results 1 to 5 of 5
  1. #1
    Proficient Member AtPixel is offline
    MemberRank
    Apr 2012 Join Date
    SomewhereLocation
    156Posts

    Launcher Problem

    Um yes, I was wondering how do I make a working launcher... I'm pretty sure mine is wrong and its something in php. It wont connect.. If anyone could help me it would be much appreciated


  2. #2
    Rada Rada. Delius is offline
    MemberRank
    Jul 2012 Join Date
    AustraliaLocation
    431Posts

    Re: Launcher Problem

    Post some/all of the code being used.
    Hard to supply any sort of help when it could be anything.

  3. #3
    Proficient Member AtPixel is offline
    MemberRank
    Apr 2012 Join Date
    SomewhereLocation
    156Posts

    Re: Launcher Problem

    Spoiler:

    <?php
    $conf['db_host'] = "HAWK905\ayaaonline";
    $conf['db_user'] = "sa";
    $conf['db_pass'] = "Password";
    $conf['db_name'] = "OdinAccounts";

    $user = sql_clean($_GET['Username']);
    $passhash = sql_clean($_GET['Password']);


    $con = mssql_connect($conf['db_host'],$conf['db_user'],$conf['db_pass']) or die('Database connect Fail.');
    $db = mssql_select_db($conf['db_name'], $con) or die('Database Init Fail.');

    $exec = mssql_query("SELECT nEMID, sUserPass FROM tAccounts where sUsername = '$user'");

    if($exec)
    {
    if(mssql_num_rows($exec) != 1)
    {
    die('Wrong Username.');
    }
    $AccountData = mssql_fetch_assoc($exec);
    $PlaintxtPass = $AccountData['sUserPass'];
    $PlaintxtnEMID = $AccountData['nEMID'];
    if (MD5($PlaintxtPass) == $passhash)
    {
    $Token = RandomToken(35);

    $setToken = null;

    if (mssql_num_rows(mssql_query("SELECT * FROM tTokens WHERE nEMID = '".$PlaintxtnEMID."'")) >= 1)
    {
    mssql_query("DELETE FROM tTokens WHERE nEMID = '".$PlaintxtnEMID."'");
    $setToken = mssql_query("INSERT INTO tTokens (nEMID, sToken) VALUES('".$PlaintxtnEMID."', '".$Token."')");
    }
    else
    $setToken = mssql_query("INSERT INTO tTokens (nEMID, sToken) VALUES('".$PlaintxtnEMID."', '".$Token."')");

    if ($setToken)
    die('OK#'.$Token);
    else
    die('SetToken Error');
    }
    else
    {
    die('Wrong Password.');
    }
    }
    else
    {
    die('Query Failed');
    }

    mssql_close();

    function sql_clean($str)
    {
    $search = array("\\", "\0", "\n", "\r", "\x1a", "'", '"');
    $replace = array("", "", "", "", "", "", "");
    return str_replace($search, $replace, $str);
    }

    function RandomToken( $length )
    {
    $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
    $str = "";
    $size = strlen( $chars );
    for( $i = 0; $i < $length; $i++ ) {
    $str .= $chars[ rand( 0, $size - 1 ) ];
    }

    return $str;
    }
    ?>



    Thats what I have..
    Last edited by AtPixel; 05-02-14 at 05:45 PM.

  4. #4
    Rada Rada. Delius is offline
    MemberRank
    Jul 2012 Join Date
    AustraliaLocation
    431Posts

    Re: Launcher Problem

    I guess just double check all the configs are right?
    Type in a browser the login info host IP/name of the script.
    Eg: 111.111.1.1/login.php or w/e, does it appear?
    If not try disable firewall and try again.

    If thats all good must be in the launcher code.

  5. #5
    Account Upgraded | Title Enabled! JakeJigsaw is offline
    MemberRank
    Jan 2014 Join Date
    ElderineLocation
    201Posts

    Re: Launcher Problem

    $conf['db_host'] = "HAWK905\ayaaonline";

    ComputerName\SQLExpress ..

    Might have to make a new database to rename all the stuff.
    also, have to use SqlSvr and configure you OBDC correctly.

    You can use Xampp.



Advertisement