Online Issue

Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 33
  1. #16
    if(!caffeine) continue; leorond is online now
    MemberRank
    Jul 2012 Join Date
    Czech RepublicLocation
    489Posts

    Re: Online Issue

    How many players have connected to the database?
    Check Connect Stat column in the table MEMB_STAT.

    - - - Updated - - -

    For every connected player you should have ConnectStat = 1

    - - - Updated - - -

    The code that I put you here is absolutely essential and if properly fill login information for the database and always displays the correct result.

    If not you'll get an error message.

    - - - Updated - - -

    Try this script
    You enter the name of your game account and choose to connect.
    If everything goes well and the number changes +1

    PHP Code:
    <?php
    $connect
    ['IP']                    =    "127.0.0.1";    //    server IP
    $connect['login']                =    "sa";            //    server login
    $connect['pass']                =    "....";        //    server password
    $connect['database']            =    "MuOnline";        //    database name
    $conn    =    mssql_connect($connect['IP'],    $connect['login'],    $connect['pass'])    or    die("<center>Can't Connect To Database</center>");
    $db        =    mssql_select_db($connect['database'],    $conn)    or    die("<center>Can't Connect To Database</center>");

    if(
    $_POST["TEST"])
    {
        
    $name        =    $_POST["name"];
        
    $connect    =    $_POST["stat"];
        
    $result        =    mssql_query("UPDATE MEMB_STAT SET ConnectStat = '".$connect."' WHERE memb___id = '".$name."' ");
        
    $ok            =    "Status was changed!";
    }
    $check mssql_fetch_array(mssql_query("SELECT * FROM MEMB_STAT WHERE ConnectStat = '1' "));
    ?>
    <form action="#" method="post">
        <input type="text" name="name" placeholder="Account name">
        <select name="stat">
            <option chacked>NONE</option>
            <option value="0">Disconnect</option>
            <option value="1">Connect</option>
        </select>
        <input type="submit" name="TEST" value="SEND">
    </form>
    <?
    $online 
    mssql_num_rows(mssql_query("SELECT * FROM MEMB_STAT WHERE ConnectStat = '1' "));

    echo 
    $ok."<br>Online:".$online;
    ?>

  2. #17
    Valued Member FanStar is offline
    MemberRank
    Sep 2011 Join Date
    HomeLocation
    104Posts

    Re: Online Issue

    Quote Originally Posted by leorond View Post
    Create a file test.php and insert this code

    PHP Code:
    <?php
    $connect
    ['IP']                    =    "127.0.0.1";    //    server IP
    $connect['login']                =    "sa";            //    server login
    $connect['pass']                =    "....";        //    server password
    $connect['database']            =    "MuOnline";        //    database name
    $conn    =    mssql_connect($connect['IP'],    $connect['login'],    $connect['pass'])    or    die("<center>Can't Connect To Database</center>");
    $db        =    mssql_select_db($connect['database'],    $conn)    or    die("<center>Can't Connect To Database</center>");

    $online mssql_num_rows(mssql_query("SELECT * FROM MEMB_STAT WHERE ConnectStat = '1' "));

    echo 
    "Online:".$online;
    ?>
    Access to this file over a fixed URL address

    for example

    http://domain.tld/test.php

    If you do not print the number of online players, the error is elsewhere.
    dont us this codes, is easy injection:)

  3. #18
    if(!caffeine) continue; leorond is online now
    MemberRank
    Jul 2012 Join Date
    Czech RepublicLocation
    489Posts

    Re: Online Issue

    Quote Originally Posted by FanStar View Post
    dont us this codes, is easy injection:)
    Learn to read FunStar, it is only to detect bugs.

    If his script lists online players so there is a problem in the script.
    If the problem is not so elsewhere.

    If you want so that I can customize with features to support and supplement mssql_real_escape_string intval etc ...

    But I have not got much time here that I wrote the entire script to display online players with complete security.

    - - - Updated - - -

    I am a PHP programmer and free I will not publish the complete codes.

    If anyone interested in a fully secure script so my hourly fee is 10-30 Euro.

    Script to view online players = one hour of work

  4. #19

    Re: Online Issue

    i see your script is for igcn databases or something, gimme your statistics.php @Tukas and ill give u better one.

  5. #20
    Member jlmandin is offline
    MemberRank
    Feb 2016 Join Date
    51Posts

    Re: Online Issue

    karli please help me in your thread in making mu season 6 ep 3 i did the server well but in game i cant open vault and npc please help

    - - - Updated - - -

    pelase help im begging you help me in your thread making season 6 ep 3 cant open vault and npc please help

  6. #21
    Member Tukas is offline
    MemberRank
    Feb 2016 Join Date
    IrelandLocation
    73Posts

    Re: Online Issue

    Quote Originally Posted by leorond View Post
    How many players have connected to the database?
    Check Connect Stat column in the table MEMB_STAT.

    - - - Updated - - -

    For every connected player you should have ConnectStat = 1

    - - - Updated - - -

    The code that I put you here is absolutely essential and if properly fill login information for the database and always displays the correct result.

    If not you'll get an error message.

    - - - Updated - - -

    Try this script
    You enter the name of your game account and choose to connect.
    If everything goes well and the number changes +1

    PHP Code:
    <?php
    $connect
    ['IP']                    =    "127.0.0.1";    //    server IP
    $connect['login']                =    "sa";            //    server login
    $connect['pass']                =    "....";        //    server password
    $connect['database']            =    "MuOnline";        //    database name
    $conn    =    mssql_connect($connect['IP'],    $connect['login'],    $connect['pass'])    or    die("<center>Can't Connect To Database</center>");
    $db        =    mssql_select_db($connect['database'],    $conn)    or    die("<center>Can't Connect To Database</center>");

    if(
    $_POST["TEST"])
    {
        
    $name        =    $_POST["name"];
        
    $connect    =    $_POST["stat"];
        
    $result        =    mssql_query("UPDATE MEMB_STAT SET ConnectStat = '".$connect."' WHERE memb___id = '".$name."' ");
        
    $ok            =    "Status was changed!";
    }
    $check mssql_fetch_array(mssql_query("SELECT * FROM MEMB_STAT WHERE ConnectStat = '1' "));
    ?>
    <form action="http://forum.ragezone.com/#" method="post">
        <input type="text" name="name" placeholder="Account name">
        <select name="stat">
            <option chacked>NONE</option>
            <option value="0">Disconnect</option>
            <option value="1">Connect</option>
        </select>
        <input type="submit" name="TEST" value="SEND">
    </form>
    <?
    $online 
    mssql_num_rows(mssql_query("SELECT * FROM MEMB_STAT WHERE ConnectStat = '1' "));

    echo 
    $ok."<br>Online:".$online;
    ?>
    Hmm here's the screenshot Screenshot by Lightshot , seems to be the same. Anyway thanks dude.

    - - - Updated - - -

    Quote Originally Posted by KarLi View Post
    i see your script is for igcn databases or something, gimme your statistics.php @Tukas and ill give u better one.
    Hi KarLi, well it's index.php but here ya go.

    https://mega.nz/#!RMNhgRZI!ZsCpBm4m3...YwEc7UWZsC8FME

    Thank you

  7. #22
    Valued Member FanStar is offline
    MemberRank
    Sep 2011 Join Date
    HomeLocation
    104Posts

    Re: Online Issue

    make index.rar

  8. #23
    Member Tukas is offline
    MemberRank
    Feb 2016 Join Date
    IrelandLocation
    73Posts

    Re: Online Issue

    Quote Originally Posted by FanStar View Post
    make index.rar
    https://mega.nz/#!cc02RDSQ!vuvm95SnR...nIxkmSIRmkUM6k

  9. #24
    if(!caffeine) continue; leorond is online now
    MemberRank
    Jul 2012 Join Date
    Czech RepublicLocation
    489Posts

    Re: Online Issue

    So this very well understand.

    You filled out the Account name, Connect and shipped.

    Script worked well and did not change the database?

    1. You filled out the wrong name for the account.

    2. You have not selected the option Connect.

    3. You have the right to change the database (You should see the error message).

    4. You have access to the database (You should see the error message).

    5. Differing column names in the database (You should see the error message).

    6. Table exist in the database (You should see the error message).

    It is impossible to be in direct registration in the database unchanged value.

    - - - Updated - - -

    You got your mistake!
    It could affect your index.php

    Different notation ( case sensitive ).

    connectstat and ConnectStat are two different things!

    PHP Code:
    $igcn_o $core_db2->Execute("SELECT connectstat FROM MEMB_STAT WHERE ConnectStat = 1"); 

  10. #25
    Member Tukas is offline
    MemberRank
    Feb 2016 Join Date
    IrelandLocation
    73Posts

    Re: Online Issue

    Quote Originally Posted by leorond View Post
    So this very well understand.

    You filled out the Account name, Connect and shipped.

    Script worked well and did not change the database?

    1. You filled out the wrong name for the account.

    2. You have not selected the option Connect.

    3. You have the right to change the database (You should see the error message).

    4. You have access to the database (You should see the error message).

    5. Differing column names in the database (You should see the error message).

    6. Table exist in the database (You should see the error message).

    It is impossible to be in direct registration in the database unchanged value.

    - - - Updated - - -

    You got your mistake!
    It could affect your index.php

    Different notation ( case sensitive ).

    connectstat and ConnectStat are two different things!

    PHP Code:
    $igcn_o $core_db2->Execute("SELECT connectstat FROM MEMB_STAT WHERE ConnectStat = 1"); 

    Well I tried to change in many different ways but still got the same, even now I copied your corrected script and got 0 online users.

  11. #26
    if(!caffeine) continue; leorond is online now
    MemberRank
    Jul 2012 Join Date
    Czech RepublicLocation
    489Posts

    Re: Online Issue

    Did you check the table in the database?

    Do you really there ConnectStat column?

    How many players are in the table online? (ConnectStat = 1)

  12. #27
    Member Tukas is offline
    MemberRank
    Feb 2016 Join Date
    IrelandLocation
    73Posts

    Re: Online Issue

    Quote Originally Posted by leorond View Post
    Did you check the table in the database?

    Do you really there ConnectStat column?

    How many players are in the table online? (ConnectStat = 1)

    Screenshot by Lightshot

    Hmm I guess that's the reason why it shows 0...

  13. #28
    if(!caffeine) continue; leorond is online now
    MemberRank
    Jul 2012 Join Date
    Czech RepublicLocation
    489Posts

    Re: Online Issue

    Yes, not all problems are in PHP.

  14. #29
    Member Tukas is offline
    MemberRank
    Feb 2016 Join Date
    IrelandLocation
    73Posts

    Re: Online Issue

    Quote Originally Posted by leorond View Post
    Yes, not all problems are in PHP.
    How can I solve this problem?

  15. #30
    Valued Member FanStar is offline
    MemberRank
    Sep 2011 Join Date
    HomeLocation
    104Posts



Page 2 of 3 FirstFirst 123 LastLast

Advertisement