Thread: How to stop "already logged in"

Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21
  1. #11  
    lol3
    Guest
    Hey rs2e, want me to post some chat logs of anc13nts being a noob? He's moron, asking me to help him on msn, after he talks **** on the forums...

    BTW, if you really want me to post pics of swagpk, then tell me, I'll be glad to take some pics of it, seeing I'm coding it.
     

  2. #12  
    anc13nts
    Guest
    Yep he wins
    EDIT: he also like arguing lol
     

  3. #13  
    Registered Member
    Join Date
    Jul 2007
    Age
    94
    Posts
    131
    Thanks given
    3
    Thanks received
    9
    Rep Power
    36
    Because I you guys so much, here is my logout.php page that I made from a modified registration page that came with Basic Server v2. All it does is let you login to verify you own the account and then UPDATE user_credentials SET loggedin='0' where name='$name

    Code:
    <?php
        define('ROOT', './');
    	include ROOT.'common/common.php';
    	include ROOT.'common/header.php';
    	
    if(isset($_POST['submit']))
    {	
    $name = $_POST['name']; 
    $pass = $_POST['pass']; 
    $newpass = $_POST['newpass'];
    
    if("$name" == "")
    {
    echo "<fieldset class=\"menu main\"><b>Manual Logout Error</b><br>Please enter a username...<br><br><a href=logout.php>Go Back</a></fieldset>";
    define('ROOT', './');
    include ROOT.'common/footer.php';
    } 
    else
    
    if("$pass" == "")
    {
    echo "<fieldset class=\"menu main\"><b>Manual Logout Error</b><br>Please enter your current password...<br><br><a href=logout.php>Go Back</a></fieldset>";
    define('ROOT', './');
    include ROOT.'common/footer.php';
    } 
    else
    
    /*if("$newpass" == "")
    {
    echo "<fieldset class=\"menu main\"><b>Manual Logout Error</b><br>Please enter a new password...<br><br><a href=logout.php>Go Back</a></fieldset>";
    define('ROOT', './');
    include ROOT.'common/footer.php';
    } 
    else*/
    
    // set your username and password and change localhost to the IP of your MYSQL server unless it is hosted locally...
    $con = mysql_connect("localhost","USERNAME","PASSWORD");
    if (!$con)
      {
      die('' . mysql_error());
      }
    mysql_select_db("DATABASE_NAME", $con);
    
    $result = mysql_query("SELECT pass FROM user_credentials where name='$name'"); 
    $thepass = mysql_result($result, 0);
    
    if("'$pass'" == "'$thepass'")
        {
    	mysql_query("UPDATE user_credentials SET loggedin='0' where name='$name'");
    //
    //	mysql_query("UPDATE user_credentials SET pass='$newpass' where //name='$name'");
    	echo "<fieldset class=\"menu main\"><b>Manual Logout</b><br>Your account has been manually logged out...<br><br><a href=logout.php>Go Back</a></fieldset>";
    include ROOT.'common/footer.php';
    	}
    	else 
    	{
    	echo "<fieldset class=\"menu main\"><b>Manual Logout Error</b><br>Incorrect password...<br><br><a href=logout.php>Go Back</a></fieldset>";
    define('ROOT', './');
    include ROOT.'common/footer.php';
    	}
    	mysql_close($con);
    	}
    ?>
    <style type="text/css">
    <!--
    .style1 {
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	font-size: 9px;
    }
    -->
    </style>
     
    <fieldset class="menu main">
    	<b>Manual Logout</b>
    	<p>This tool is to be used when the a player tries to log in and the server glitches and says that they are already logged in.</p>
    	<br />
    	<form action="<?php echo basename($_SERVER['PHP_SELF']); ?>" method="POST">
    <table>
      <tr>
        <td><span class="style7">Username:</span></td>
        <td><input name="name" type="text" id="name" /></td>
      </tr>
      <tr>
        <td><span class="style7">Current Password:</span></td>
        <td><input name="pass" type="password" id="pass" value="" maxlength="20" /></td>
      </tr>
    
    <!--  <tr>
        <td><span class="style7">New Password:</span></td>
        <td><input name="newpass" type="password" id="newpass" value="" maxlength="20" /></td>
      </tr> -->
    
      <tr>
        <td colspan="2"><input type="submit" name="submit" value="Fix my account!" /></td>
      </tr>
    </table>
    </form>
    </fieldset>
    <?php
    
    	include ROOT.'common/footer.php';
     

  4. #14  
    xiphias__
    Guest
    Quote Originally Posted by anc13nts View Post
    It will cause more lagg if you have a slow pc or a cheap dedi, Also
    you fail just leave seriously, theres nothing you can do here.
    How will it cause more lag by kicking a player? Think about what you're posting before you actually post it.

    And according to the post he just made explaining WHY it wont create 'lag', I don't think he seriously fails, do you?
     

  5. #15  
    Renown Programmer
    veer's Avatar
    Join Date
    Nov 2007
    Posts
    3,746
    Thanks given
    354
    Thanks received
    1,370
    Rep Power
    3032
    lol @ cellkyborg: rofl getCurrentTimeMillis() loooooooooooooooooool
     

  6. #16  
    cooplet
    Guest
    ppl dont me mean and flame man its works for me thanks mate
     

  7. #17  
    xiphias__
    Guest
    Quote Originally Posted by supa_ View Post
    lol @ cellkyborg: rofl getCurrentTimeMillis() loooooooooooooooooool
    dood watch hell System.getNanoTime() ur as
     

  8. #18  
    Banned

    Join Date
    Oct 2007
    Posts
    1,406
    Thanks given
    37
    Thanks received
    79
    Rep Power
    0
    Quote Originally Posted by anc13nts View Post
    Well... I would say good job but I tested it and it gets no errors but...
    I tried this I loaded 2 clients logged in on my acc then tried logging in on the other client with the same acc and It just kicked my other acc.
    But then if someone found out another players password and wanted to steal there items they would easily be able to then because all they would have to do is try and log in and it will kick the player and then they are in..
    just basicly remove the "}"lol?
     

  9. #19  
    anc13nts
    Guest
    Well there is one problem with this, it will make a force logout, which can be used to dupe hence when your about to attack a monster you open up another client and login which will make a force logout causing a dupe, and you will be able to do the same when fighting.
     

  10. #20  
    SRBuckey5266
    Guest
    This happens to me all the time, so anoying!
     

Page 2 of 3 FirstFirst 123 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

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