Current Logins

Page 1 of 2 12 LastLast
Results 1 to 25 of 42
  1. #1
    Alpha Member Cyndaquil is offline
    MemberRank
    Mar 2012 Join Date
    EnglandLocation
    2,137Posts

    Current Logins

    Hello,

    I am wondering how to create the User Login widget which can go on websites and/or forums?
    If you could help that would be fantastic!

    Thank You,
    Chris


  2. #2
    Electro, dude. Bakey is offline
    MemberRank
    Oct 2010 Join Date
    403Posts

    Re: Current Logins

    What widget O_O.

  3. #3
    Alpha Member Cyndaquil is offline
    MemberRank
    Mar 2012 Join Date
    EnglandLocation
    2,137Posts

    Re: Current Logins

    Basically it shows who logins into the game - Like on Terra, fine Terra has it but yeah its cool, it just auto refreshes when someone logs in.

  4. #4
    Account Upgraded | Title Enabled! Flash1369 is offline
    MemberRank
    Oct 2011 Join Date
    892Posts

    Re: Current Logins

    i guess it refreshes every one second, donno if what you said is possibro.

  5. #5
    Alpha Member Cyndaquil is offline
    MemberRank
    Mar 2012 Join Date
    EnglandLocation
    2,137Posts

    Re: Current Logins

    Quote Originally Posted by Flash1369 View Post
    i guess it refreshes every one second, donno if what you said is possibro.
    Terra had it :o doesnt work atm and so did Sin Online.

  6. #6
    Apprentice Meink is offline
    MemberRank
    Jan 2012 Join Date
    20Posts

    Re: Current Logins

    You mean live logins.

  7. #7
    Electro, dude. Bakey is offline
    MemberRank
    Oct 2010 Join Date
    403Posts

    Re: Current Logins

    I made the one for Sin, nothing fancy, just a quick job.

  8. #8
    Alpha Member Cyndaquil is offline
    MemberRank
    Mar 2012 Join Date
    EnglandLocation
    2,137Posts

    Re: Current Logins

    Would you be so kind to release it Bakey ^^? Much appreciated if you do :)!

  9. #9
    Electro, dude. Bakey is offline
    MemberRank
    Oct 2010 Join Date
    403Posts

    Re: Current Logins

    Sorry, since I am a "shit dev", I don't feel good releasing it to other people because, it might have vulns in it.

  10. #10
    Alpha Member Cyndaquil is offline
    MemberRank
    Mar 2012 Join Date
    EnglandLocation
    2,137Posts

    Re: Current Logins

    Ok then :)! No problem. not gunna lose sleep over it O_o

  11. #11
    I can has title? hamisgood87 is offline
    MemberRank
    Feb 2012 Join Date
    GoogleLocation
    447Posts

    Re: Current Logins

    Quote Originally Posted by Bakey View Post
    Sorry, since I am a "shit dev", I don't feel good releasing it to other people because, it might have vulns in it.
    dat vulns, So scary x.x I shall look into this! Although I doubt I'll figure it out xD.
    K so, I made something really quick, based off of another script I found in the forums. Yea I don't know php... Also it takes character name instead of account name. It does work, just tested it.
    PHP Code:
    <?php  

        
    // CONFIG 
        
    $odbc_host ''
        
    $odbc_user ''
        
    $odbc_pass ''
        
    // CONFIG END 
         
        
    echo '<h1><center>Last 5 players to log on</h1></center>'
        
    $odbc_link odbc_connect "Driver={SQL Server};Server=".$odbc_host.";Database=World00_Character;" $odbc_user $odbc_pass ); 
         
        
    $sql[1] = 'SELECT TOP 5 nCharNo, sID, dLastLoginDate FROM tCharacter WHERE bDeleted = 0 ORDER  BY dLastLoginDate DESC'
        
    $rs[1] = odbc_exec $odbc_link $sql[1] ); 
        if ( !
    $rs[1] ) 
            { 
            exit ( 
    'Error in SQL' ); 
            } 
         
        
    $i 1
             
        echo 
    '<table width="100%">'
        echo 
    '    <tr>'
        echo 
    '        <td>'
        echo 
    '            <h3>#</h3>'
        echo 
    '        </td>';
        echo 
    '        <td>'
        echo 
    '            <h3>Name</h3>'
        echo 
    '        </td>';
        echo 
    '    </tr>'
        while ( 
    odbc_fetch_row $rs[1] ) ) 
            { 
            
    $sID odbc_result $rs[1] , 'sID' ); ; 
            
    $sID str_replace 'ä' '&auml;' str_replace 'Ä' '&Auml;' str_replace 'ö' '&ouml;' str_replace 'Ö' '&Ouml;' str_replace 'ü' '&uuml;' str_replace 'Ü' '&Uuml;' str_replace 'ß' '&szlig;' $sID ) ) ) ) ) ) ); 
             
            
    $nCharNo odbc_result $rs[1] , 'nCharNo' ); 

             
            echo 
    '    <tr>'
            echo 
    '        <td>'
            echo 
    '            '.$i
            echo 
    '        </td>'
            echo 
    '        <td>'
            echo 
    '            '.$sID
            echo 
    '        </td>';  
            echo 
    '        <td>'
            echo 
    '    </tr>'
             
            
    $i++; 
            } 
             
        
    odbc_close $odbc_link ); 
         
        echo 
    '</table>'

    ?>
    Last edited by hamisgood87; 26-07-12 at 01:38 AM.

  12. #12
    Proficient Member xWhiteCore is offline
    MemberRank
    Jun 2012 Join Date
    193Posts

    Re: Current Logins

    Quote Originally Posted by Ceila View Post
    Terra had it :o doesnt work atm and so did Sin Online.
    It's a simple PHP code i've it also...

  13. #13
    I can has title? hamisgood87 is offline
    MemberRank
    Feb 2012 Join Date
    GoogleLocation
    447Posts

    Re: Current Logins

    Quote Originally Posted by xWhiteCore View Post
    It's a simple PHP code i've it also...
    Good job. We figured that out already.
    Now that i look at the script I posted... I have realized something... It looks absolutely terrible.

  14. #14
    Electro, dude. Bakey is offline
    MemberRank
    Oct 2010 Join Date
    403Posts

    Re: Current Logins

    Completely wrong.

  15. #15
    I can has title? hamisgood87 is offline
    MemberRank
    Feb 2012 Join Date
    GoogleLocation
    447Posts

    Re: Current Logins

    Quote Originally Posted by Bakey View Post
    Completely wrong.
    What?

  16. #16
    Electro, dude. Bakey is offline
    MemberRank
    Oct 2010 Join Date
    403Posts

    Re: Current Logins

    1. That's character logins, not account logins.
    2. That won't auto-refresh.
    3. You're not caching so you're going to put a lot of stress on your server, doing query-per-second for every person viewing the page (After you get the refresh part fixed).
    4. The code is just plain out messy, I could sit here and point out things that are bad practice.

  17. #17
    Gruntilda Gruntilda is offline
    MemberRank
    Apr 2010 Join Date
    468Posts

    Re: Current Logins

    Thanks for letting me know Terra's didn't work, forgot about it c: Fixed -*-*

    And btw, you could just look at T's html source and pretty much figure out how it was done.

    http://tll2.extrinsicstudio.com
    Last edited by Gruntilda; 26-07-12 at 02:23 AM.

  18. #18
    Electro, dude. Bakey is offline
    MemberRank
    Oct 2010 Join Date
    403Posts

    Re: Current Logins

    Quote Originally Posted by iStu View Post
    Thanks for letting me know Terra's didn't work, forgot about it c: Fixed
    Omg source pls.

  19. #19
    I can has title? hamisgood87 is offline
    MemberRank
    Feb 2012 Join Date
    GoogleLocation
    447Posts

    Re: Current Logins

    Quote Originally Posted by Bakey View Post
    1. That's character logins, not account logins.
    2. That won't auto-refresh.
    #1 I think i said that for it being character.
    #2 yea true.

    Quote Originally Posted by Bakey View Post
    3. You're not caching so you're going to put a lot of stress on your server, doing query-per-second for every person viewing the page (After you get the refresh part fixed).
    I shall do that after looking into it!...cause I just have no idea.

    Quote Originally Posted by Bakey View Post
    4. The code is just plain out messy, I could sit here and point out things that are bad practice.
    I don't know php and i pretty much just copied somebody else's code for something else and changed a few things.
    Last edited by hamisgood87; 26-07-12 at 02:45 AM. Reason: I can't count.

  20. #20
    Proficient Member xWhiteCore is offline
    MemberRank
    Jun 2012 Join Date
    193Posts

    Re: Current Logins

    Quote Originally Posted by hamisgood87 View Post
    What?
    Bakey has right.. it's wrong...

  21. #21
    I can has title? hamisgood87 is offline
    MemberRank
    Feb 2012 Join Date
    GoogleLocation
    447Posts

    Re: Current Logins

    late again... We all already see that.

  22. #22
    Proficient Member josh2k7 is offline
    MemberRank
    Jun 2012 Join Date
    181Posts

    Re: Current Logins

    ok i have to say this Bakey who in there right mind said your "shit Dev" i would like to know this cause truthfully that person needs to take a .357 load it insert in there mouth and pull the trigger cause i know that you are not a "shit Dev" bakey your one of the best out there so i think someone is a complete retard and the world would be better off with out that person in it but yeah im sorry someone said that to you bakey

  23. #23
    Electro, dude. Bakey is offline
    MemberRank
    Oct 2010 Join Date
    403Posts

    Re: Current Logins

    Ceila did, on another forum. Things get around though, you know?

  24. #24
    Proficient Member josh2k7 is offline
    MemberRank
    Jun 2012 Join Date
    181Posts

    Re: Current Logins

    well bakey what i said is fact and he is just gonna have to deal with the fact that anyone who knows anything knows that you are a much better dev than ceila on one of ur bad days and ceila can go fuck him or herself cause i know u do so much better and ceila is just mad cause you wont teach the knowledge to him or her so ceila can go right on hating because we all know bakey haters will hate so i say this "fuck you ceila u wanna rag on someone rag on a noob like me dont lie about ppl who are better than you at developing"

  25. #25
    Alpha Member Cyndaquil is offline
    MemberRank
    Mar 2012 Join Date
    EnglandLocation
    2,137Posts

    Re: Current Logins

    Quote Originally Posted by josh2k7 View Post
    well bakey what i said is fact and he is just gonna have to deal with the fact that anyone who knows anything knows that you are a much better dev than ceila on one of ur bad days and ceila can go fuck him or herself cause i know u do so much better and ceila is just mad cause you wont teach the knowledge to him or her so ceila can go right on hating because we all know bakey haters will hate so i say this "fuck you ceila u wanna rag on someone rag on a noob like me dont lie about ppl who are better than you at developing"
    lol - I never said I could dev ^^? So basically it doesn't really affect me saying I can't dev. Anyhow I wont lie I did say Bakey is a shit dev; but that is just for Fiesta. Not things like PHP, or such. I haven't really seen any of Bakey's PHP or SQL work so I can't judge that, but from Dusk work he did; I didn't really like it, thought it was pretty crap. So josh please Don't get involved which shit you don't know about thx.

    I would publicly like to apologise to you Bakey if this really made offended.



Page 1 of 2 12 LastLast

Advertisement