Atom Project: The hybrid server

Page 27 of 56 FirstFirst ... 17192021222324252627282930313233343537 ... LastLast
Results 391 to 405 of 838
  1. #391
    Atomic Developer lab-hotel is offline
    MemberRank
    Apr 2007 Join Date
    261Posts

    Re: Atom Project: The hybrid server

    I'm working on the PHP wrapper for the global login.

    Simple implementation:
    PHP Code:
    $err 0;
    HPMLogin($username$password$err);
    if(
    $err->eHPMError == -1)
    {
        
    // Login Successful, let's check if the user exists in our database.
        
    if($core->GetUserData($username))
        {
            
    // User Exists, log in
            
    $session->SetUser($username);
        }
        else
        {
            
    // First login, create user in our database
            
    $core->CreateUser($username$password);
            
    $session->SetUser($username);
        }
    }
    else
    {
        
    // Login failed.
        
    echo $err->errDescription;

    But first, you need to define the THPMError struct:
    PHP Code:
    class THPMError
    {
        var 
    $eHPMError 0;
        var 
    $eDetailedErrorType 0;
        var 
    $ErrCode 0;
        var 
    $errDescription "";
    }; 
    It don't implements just the login, but all HabboRails API unctions:
    int HPMLogin(char* user, char* password, THPMError* error);
    int HPMGetAppStats(THPMAppStats* stats, THPMError* error);
    int HPMEnumerateApp(int appID, THPMApp* info, THPMError* error);
    int HPMIsAppSubscribed(int appID, int* subscribed, THPMError* error);
    int HPMMountAppFilesystem(THPMError* error);
    HPMHandle_t HPMOpenFileEx(const char *cszFileName, const char *cszMode, unsigned int *puSize, THPMError* error);
    int HPMReadFile(void *pBuf, unsigned int uSize, unsigned int uCount, HPMHandle_t hFile, THPMError *error);
    int HPMCloseFile(HPMHandle_t hFile, THPMError *error);
    With these functions, you can, for example, check if an user has permission to access your hotel, useful during long maintenances or a closed beta:
    PHP Code:
    $hotelAppId 1337;
    $subscribed 0;
    HPMIsAppSubscribed($hotelAppId$subscribed$err);

    if(
    $subscribed == 1)
    {
        
    // ...
    }
    else
    {
        echo 
    "You don't have permission to access the Hotel.";

    By the way, like our facebook page: http://www.facebook.com/pages/Projec...45103918937538

    @cecer1
    Like a bro

  2. #392
    "(still lacks brains)" NoBrain is offline
    MemberRank
    Sep 2011 Join Date
    United KingdomLocation
    2,658Posts

    Re: Atom Project: The hybrid server

    How many fucking languages do you know?! ;o

    Nice work though. :)

  3. #393
    Alpha Member Zak© is offline
    MemberRank
    Oct 2007 Join Date
    2,693Posts

    Re: Atom Project: The hybrid server

    You don't need to be smart to know a lot of languages ^_^

  4. #394
    "(still lacks brains)" NoBrain is offline
    MemberRank
    Sep 2011 Join Date
    United KingdomLocation
    2,658Posts

    Re: Atom Project: The hybrid server

    Quote Originally Posted by Zak© View Post
    You don't need to be smart to know a lot of languages ^_^
    Never said you did need to smart?

  5. #395
    Member Al0ne is offline
    MemberRank
    Jan 2012 Join Date
    NetherlandsLocation
    88Posts

    Re: Atom Project: The hybrid server

    Very nice! i'll follow your development, amazing!

  6. #396
    Alpha Member Zak© is offline
    MemberRank
    Oct 2007 Join Date
    2,693Posts

    Re: Atom Project: The hybrid server

    Quote Originally Posted by ησвяαιη View Post
    Never said you did need to smart?
    With your reaction, it was like you were shouting genius!
    ^_^

  7. #397
    Account Upgraded | Title Enabled! Ma Ma is offline
    MemberRank
    Jan 2011 Join Date
    home.phpLocation
    580Posts

    Re: Atom Project: The hybrid server

    You need time and brain space to know a lot of languages
    Posted via Mobile Device

  8. #398
    "(still lacks brains)" NoBrain is offline
    MemberRank
    Sep 2011 Join Date
    United KingdomLocation
    2,658Posts

    Re: Atom Project: The hybrid server

    Quote Originally Posted by Resource View Post
    You need time and brain space to know a lot of languages
    Posted via Mobile Device
    Rules me out, I have no brain.

  9. #399
    JustLikeMeForNoReason Kaan2106 is offline
    MemberRank
    Nov 2007 Join Date
    282Posts

    Re: Atom Project: The hybrid server

    lab your site is down, again :@ aargh.. :)

    how work the test-server with 1 cmd box? you said, the server needs 4 :o i don't get it XD

  10. #400
    hi i'm robbie Roper is offline
    MemberRank
    Oct 2008 Join Date
    /home/roperLocation
    2,283Posts

    Re: Atom Project: The hybrid server

    Looks like fantastic progress is being made, well done. I hope you succeed :)

  11. #401
    Atomic Developer lab-hotel is offline
    MemberRank
    Apr 2007 Join Date
    261Posts

    Re: Atom Project: The hybrid server

    Because of some bugs and compatibility issues (the code is ugly, full of comments, there's window flickering etc), I'm going to recode HabboRails with a new GUI system that can be ported to Mac and Linux later.

    @Kaan2106
    I know, mate, I really need a VPS (if anyone would like to donate, I like donations :P). Anyway, the test server uses 4: MySQL, Tomcat, the server itself and the proxy.
    Posted via Mobile Device
    Last edited by lab-hotel; 28-01-12 at 03:40 PM.

  12. #402
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,476Posts

    Re: Atom Project: The hybrid server

    Quote Originally Posted by lab-hotel View Post
    Because of some bugs and compatibility issues (the code is ugly, full of comments, there's window flickering etc), I'm going to recode HabboRails with a new GUI system that can be ported to Mac and Linux later.

    @Kaan2106
    I know, mate, I really need a VPS (if anyone would like to donate, I like donations :P). Anyway, the test server uses 4: MySQL, Tomcat, the server itself and the proxy.
    Posted via Mobile Device
    I could hook you up with a vps.
    The vps isn't the best, as it has 512 MB RAM and is a Windows 2003 Server.

  13. #403
    JustLikeMeForNoReason Kaan2106 is offline
    MemberRank
    Nov 2007 Join Date
    282Posts

    Re: Atom Project: The hybrid server

    i want to download ur server now xDDD i can't wait :D ....
    it's only for me but it isn't important ^^

  14. #404
    Atomic Developer lab-hotel is offline
    MemberRank
    Apr 2007 Join Date
    261Posts

    Re: Atom Project: The hybrid server

    Test server is back online. Project Atom

    @Quackster
    Do you run anything on it? What's the processor?

  15. #405
    Run, but I'll find you. Ddos Attack is offline
    MemberRank
    Jan 2011 Join Date
    AustraliaLocation
    908Posts

    Re: Atom Project: The hybrid server

    That is just kewl. The "fight" command is AWESOME



Advertisement