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!


Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    May 2007
    Location
    Brisbane, Australia
    Posts
    796
    Tokens
    0

    Default Alert Site (MYSQL) (PHP)

    Hello im after a script that alerts the site? can someone post a link to a tut or a download link i dont know what to search in G o o g l e'
    Thanks,
    Chris
    Free Image Uploading

    __________________


    [/url]

    [/FONT]

  2. #2
    Join Date
    Oct 2006
    Location
    BUXTON
    Posts
    2,191
    Tokens
    0

    Latest Awards:

    Default

    Most Djpanel do site/ip alerts check out www.habboring.com

  3. #3
    Join Date
    May 2007
    Location
    Brisbane, Australia
    Posts
    796
    Tokens
    0

    Default

    Yes i tried PP but i couldent do it
    Thanks,
    Chris
    Free Image Uploading

    __________________


    [/url]

    [/FONT]

  4. #4
    Join Date
    Dec 2007
    Posts
    1,683
    Tokens
    0

    Latest Awards:

    Default

    Dude, your making a DJ Panel/CMS..


    You really have to know how to make a simple alert system, really it's not hard, I'd write you one, but I doubt you'll get far with it. (;

  5. #5
    Join Date
    Nov 2007
    Posts
    753
    Tokens
    0

    Default

    Right your trying to make a simple alert system, all it uses is abit of javascript which your cms uses. Its getting quite obvious you didnt make the cms
    Publishing free website designs, watch this space!
    Total number of designs published: 0
    Current work in progress: Landscape Design


  6. #6
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    put the alert into a database with a timestamp, then use simple javascript and php to display it and delete it?
    Coming and going...
    Highers are getting the better of me

  7. #7
    Join Date
    Jan 2007
    Location
    Canada eh?
    Posts
    766
    Tokens
    75

    Default

    Quote Originally Posted by Xedon View Post
    You really have to know how to make a simple alert system, really it's not hard, I'd write you one, but I doubt you'll get far with it. (;
    Okay, let's get a couple things straight:

    1) It's usually the 'pseudo code' that kills you, not the actual code. Basically what I'm saying is that before you code anything you have to think up the logic behind the code (how it will work) and usually that's what stumps people.

    2) I'm going to actually be helpful and post some pseudo code for him to follow.

    Your MySQL DB Structure - Fields
    id - like your primary key (automatic number)
    ipaddr - the IP which the alert will be sent to
    timesent - use the php time() function to make a timestamp
    timeexpire - use time()+3600 for expire in 1 hour
    from - the name of the DJ/user sending the message
    message - the actual message to be sent

    How It Works
    1. Start by having your DJ/user fill out the form with the IP and Message.
    2. Calculate the current time and expiry time with time().
    3. Input all that info into your MySQL DB.
    4. On your 'alert.php' page check if the users IP matches any of the alerts in the DB and then if so display it then delete it (refer to code below).

    Pseudo Code
    PHP Code:
    <?php
    $ip 
    $_SERVER['REMOTE_ADDR']; //Define their IP address
    $qry mysql_query("SELECT * FROM `alerts`"); //Get alerts from db
    while($row mysql_fetch_array($qry)){
    if(
    $ip == $row['ipaddr']){
         
    $id $row['id']; //Define what $id refers to
         
    $from $row['from']; //Define what $from refers to
         
    $msg $row['message']; // Define what $msg refers to
         
    echo "<script>alert('$from says: $msg');</script>"//Send js alert
         
    mysql_query("DELETE FROM `alerts` WHERE `id` = '$id'"); //Delete
    }
    }
    ?>
    Now you would just have to customize that code for your uses

    [double post]

    Sorry, a moderator may remove this if they wish to do so.

    Edited by H0BJ0B (Forum Moderator): Please be more careful when posting. Thanks.
    Last edited by H0BJ0B; 03-02-2008 at 12:43 PM.

  8. #8
    Join Date
    May 2007
    Location
    Brisbane, Australia
    Posts
    796
    Tokens
    0

    Default

    Guys i dident make the CMS i just found it called SIIMPLYcms and im like okay ill use it i dident say i made it all all.
    Thanks,
    Chris
    Free Image Uploading

    __________________


    [/url]

    [/FONT]

  9. #9
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    so basically your commiting copyright theft then.
    And plaigerism?

    Woah, you so shouldnt have told us that.
    Coming and going...
    Highers are getting the better of me

  10. #10
    Join Date
    May 2007
    Location
    Brisbane, Australia
    Posts
    796
    Tokens
    0

    Default

    Uhh NO I SAID I DID NOT ******* MAKE THE CMS I SAID THAT I FOUND IT! OMG READ THE ******* POST!
    Thanks,
    Chris
    Free Image Uploading

    __________________


    [/url]

    [/FONT]

Page 1 of 2 12 LastLast

Posting Permissions

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