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 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Admin Notes

  1. #11
    Prick Guest

    Default

    Now it works

    Thanks +rep

    Just one little thing, whats the best permissions to set?
    I don't want anyone to be able to read the .txt file by going to www.(site).net/admin/adminnotes.txt
    atm anyone can go to that link and see the notes, how can I stop people form seeing them?
    Last edited by Prick; 10-03-2008 at 09:11 PM.

  2. #12
    Prick Guest

    Default

    Ugh sorry for double post modzzz

    Yeah is 750 permissions on each file enough?
    I went on a proxy and it said forbidden so I guess it is?

  3. #13
    Join Date
    Mar 2008
    Posts
    173
    Tokens
    0

    Default

    You don't have to fread or open it for that matter. file_get_contents should do the trick.

    http://www.php.net/file_get_contents

    Code:
    file_get_contents — Reads entire file into a string
    string file_get_contents     ( string $filename    [, int $flags    [, resource $context    [, int $offset    [, int $maxlen   ]]]] )

  4. #14
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    To protect it, basically you can just add a quick "Validation" of who it is, just add another input called
    HTML Code:
    <input type="password" name="pw">
    into the admin.php and then into the send.php, before everything else add
    PHP Code:
    $password "Yourpwhere";
    if(isset(
    $_POST["pw"])) {
        if((
    $_POST["pw"] == "$password")) {
            {
            
    # Rest of the code here... 
    then add this at the end of the code
    PHP Code:
    } } 
    This is a poor way to secure a page... Unless you build a member system with encrypts and session checking.
    Hi, names James. I am a web developer.

Page 2 of 2 FirstFirst 12

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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