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 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 36
  1. #21
    Join Date
    Dec 2007
    Posts
    1,683
    Tokens
    0

    Latest Awards:

    Default

    flat file is just too insecure..

    Offtopic: Hey edd

  2. #22
    Join Date
    Nov 2006
    Location
    Boro
    Posts
    841
    Tokens
    1,650

    Latest Awards:

    Exclamation

    Quote Originally Posted by Tom743 View Post
    I would simply do

    maintanance.php
    PHP Code:
    <?php
    $maintanance 
    file_get_contents("maintanance.txt");
    if ( 
    $maintanance == "true" ){
    echo 
    "site is offline";
    exit();
    }
    ?>
    2hsus7sjs.php (has a funny name so no one will find it lol)
    PHP Code:
    <?php
    if ( $_GET['action'] == "submit" ) {
    $maintanance $_POST['maintanance'];
    $changefile file("maintanance.txt");
    $update fopen($changefile "w");
    fputs($update "$maintanance");
    fclose($update);
    }
    ?>
    <form method="post" action="?action=submit">
    <table>
    <tr><td>Close?</td>
    <td>
    <select name="maintanance">
    <option value="true" selected>Put site offline
    <option value="false">Put site Online
    </select>
    </td></tr><tr><td colspan="2">
    <center><input type="submit" value="change"></center>
    </td></tr></table>
    </form>
    Not tested, should work

    Also, it requires no database.

    EDIT: allmost forgot lol, to make the script work add

    PHP Code:
    <?php include("maintanance.php"); ?>
    to the index page of your site.
    doesnt work dude.
    x
    *hi*


    Edited by Bonxy



  3. #23
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Bonxy View Post
    doesnt work dude.
    x
    what bit is the problem?
    Quote Originally Posted by Supermassive View Post
    flat file is just too insecure..

    Offtopic: Hey edd
    Does it realy matter if someone reads a text file that says "offline" or "online" in it?
    Lets set the stage on fire, and hollywood will be jealous.

  4. #24
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Quote Originally Posted by Supermassive View Post
    flat file is just too insecure..

    Offtopic: Hey edd
    File based systems can be just as secure as databases.


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

  5. #25
    Join Date
    May 2008
    Posts
    127
    Tokens
    0

    Default

    Quote Originally Posted by Jewish Bear View Post
    File based systems can be just as secure as databases.
    Indeed, although, I found it annoying doing it o_O

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

    Latest Awards:

    Default

    Quote Originally Posted by Tom743 View Post
    what bit is the problem?

    Does it realy matter if someone reads a text file that says "offline" or "online" in it?
    Ah I never read the code, I thought it was for the user authentication.

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

    Latest Awards:

    Default

    SQL query:
    CREATE TABLE `sitestatus` ( `id` INT( 2 ) NOT NULL AUTO_INCREMENT ,
    `status` VARCHAR( 10 ) NOT NULL ,
    `offmsg` TEXT NOT NULL ,
    `onpage` VARCHAR( 50 ) NOT NULL ,
    PRIMARY KEY ( `id` )
    ) ENGINE = MYISAM INSERT INTO `sitestatus` ( `id` , `status` , `offmsg` , `onpage` )
    VALUES ( '1', 'off', 'The site is currently offline for some much needed maintenance work on the frameworks!', 'http://www.radioaqua.net/'
    )
    MySQL said:
    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO `sitestatus` (
    `id` ,
    `status` ,
    `offmsg` ,
    `onpage`
    )
    VALUES ' at line 9

    I'm no MySQL Guru, someone help (A)

    Couldn't edit the other one after 15 minutes.
    Last edited by Independent; 31-05-2008 at 06:11 AM.

  8. #28
    Join Date
    Nov 2006
    Location
    Boro
    Posts
    841
    Tokens
    1,650

    Latest Awards:

    Exclamation

    Quote Originally Posted by Tom743 View Post
    I would simply do

    maintanance.php
    PHP Code:
    <?php
    $maintanance 
    file_get_contents("maintanance.txt");
    if ( 
    $maintanance == "true" ){
    echo 
    "site is offline";
    exit();
    }
    ?>
    2hsus7sjs.php (has a funny name so no one will find it lol)
    PHP Code:
    <?php
    if ( $_GET['action'] == "submit" ) {
    $maintanance $_POST['maintanance'];
    $changefile file("maintanance.txt");
    $update fopen($changefile "w");
    fputs($update "$maintanance");
    fclose($update);
    }
    ?>
    <form method="post" action="?action=submit">
    <table>
    <tr><td>Close?</td>
    <td>
    <select name="maintanance">
    <option value="true" selected>Put site offline
    <option value="false">Put site Online
    </select>
    </td></tr><tr><td colspan="2">
    <center><input type="submit" value="change"></center>
    </td></tr></table>
    </form>
    Not tested, should work

    Also, it requires no database.

    EDIT: allmost forgot lol, to make the script work add

    PHP Code:
    <?php include("maintanance.php"); ?>
    to the index page of your site.
    Id tell anyone to use this one.

    you just copy and paste everything and then ChMOD maintanance.txt so it is 777 and it works.

    There is nothing up with it.

    *hi*


    Edited by Bonxy



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

    Latest Awards:

    Default

    Quote Originally Posted by Bonxy View Post
    Id tell anyone to use this one.

    you just copy and paste everything and then ChMOD maintanance.txt so it is 777 and it works.

    There is nothing up with it.

    Then that's a flatfile maintenance system. rofl

  10. #30
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Minor View Post
    Then that's a flatfile maintenance system. rofl
    Whats wrong with that
    Lets set the stage on fire, and hollywood will be jealous.

Page 3 of 4 FirstFirst 1234 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
  •