Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 5 of 5

Thread: Is it possible?

  1. #1
    Join Date
    Nov 2006
    Location
    D?sseldorf
    Posts
    2,858
    Tokens
    2,256

    Latest Awards:

    Default Is it possible?

    Another question

    Is it possible to setup an email or something, to update a MySQL database field?
    So if i email a word to the address, it would modify the field with that word?

    Cheers

  2. #2
    Join Date
    Jun 2008
    Location
    United Kingdom
    Posts
    2,015
    Tokens
    568

    Latest Awards:

    Default

    Yes, it's possible and pretty straightforward.
    You could write a php script to connect to the email account, grab the body of the most recent email (you might want to verify it's from the right sender), then update the field. You might also want to check if the most recent email is different to the last time you checked it, just to save you overwriting the field with the same info, but it's up to you.
    Then just set up a cron job to run it every hour/five minutes/whatever. Boom, done.

    There might be a simpler way, but that method is pretty simple as it is.

  3. #3
    Join Date
    Nov 2006
    Location
    D?sseldorf
    Posts
    2,858
    Tokens
    2,256

    Latest Awards:

    Default

    Quote Originally Posted by Trinity View Post
    Yes, it's possible and pretty straightforward.
    You could write a php script to connect to the email account, grab the body of the most recent email (you might want to verify it's from the right sender), then update the field. You might also want to check if the most recent email is different to the last time you checked it, just to save you overwriting the field with the same info, but it's up to you.
    Then just set up a cron job to run it every hour/five minutes/whatever. Boom, done.

    There might be a simpler way, but that method is pretty simple as it is.
    Right, I understand it, but don't know how to code it -.- Any chance you can point me in the right direction?

    Cheers

  4. #4
    Join Date
    May 2005
    Location
    /etc/passwd
    Posts
    19,110
    Tokens
    1,139

    Latest Awards:

    Default

    If this is for what I think it is, why overcomplicate it with MySQL? You could easily use a flat file.

  5. #5
    Join Date
    Nov 2006
    Location
    D?sseldorf
    Posts
    2,858
    Tokens
    2,256

    Latest Awards:

    Default

    Yes it is, and didn't think of that actually - either one will do.

Posting Permissions

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