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 8 of 8
  1. #1

    Question Help with a upload script

    Hello,

    I have an basic upload script and I was wondering if there was a way I could have something like an admin feature where I can control images from a page so if someone uploads an inaaprioate file onto my server then I can delete it without having to got through cpanel to delete it. I have forbid access to the /uploads/ dir for security reasons.

    Thanks!

  2. #2
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    http://www.softwareprojects.org/php-files-15.htm
    http://www.w3schools.com/PHP/php_file.asp
    http://www.schogini.com/articles/Fil...ng-in-PHP.html

    Havn't looked deeply at the links but i google "file handling + php".

    If you learn that then sort out the permissions for your image directory then you will be able to delete the images via AdminCP.

  3. #3
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    This is a main reason I store information about my files in the database, filename, etc and provide it with an ID.

    That way I can simply list all of the files from the database, pull the thumbnail/image.. then do my 'managing'.

    To delete a file, simple do:

    PHP Code:
    unlink'path/to/file.png' ); 
    If the folder has the correct permissions then it should delete.

    Listing the contents of a directory is something different.

    If you need help with that also, post and I'll help.

  4. #4
    Join Date
    Dec 2007
    Location
    Manchester
    Posts
    2,236
    Tokens
    118
    Habbo
    hamheyelliot

    Latest Awards:

    Default

    Strictly speaking, if it's a Free Basic Script, it may as well be a Free Script with an Admin function already there?

    www.maianscriptworld.co.uk has one.

    Or XtraUpload perhaps.

    They're not chock-a-block with Security Features as far as I know; but if you're not much for coding one; well they'll make do perhaps?

  5. #5
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Quote Originally Posted by Hamhey View Post
    Strictly speaking, if it's a Free Basic Script, it may as well be a Free Script with an Admin function already there?

    www.maianscriptworld.co.uk has one.

    Or XtraUpload perhaps.

    They're not chock-a-block with Security Features as far as I know; but if you're not much for coding one; well they'll make do perhaps?
    If it's not secure, then what's the point in using it? How will that 'do'?

  6. #6
    Join Date
    Dec 2007
    Location
    Manchester
    Posts
    2,236
    Tokens
    118
    Habbo
    hamheyelliot

    Latest Awards:

    Default

    Quote Originally Posted by Dentafrice View Post
    If it's not secure, then what's the point in using it? How will that 'do'?
    Well I've no idea I'm afraid, they're most likely good scripts, but I can't be the judge.

  7. #7
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    I'm not saying that they are not good scripts, I'm just saying.. you said even if they had security issues, that they would probably 'do'?

  8. #8
    Join Date
    Dec 2007
    Location
    Manchester
    Posts
    2,236
    Tokens
    118
    Habbo
    hamheyelliot

    Latest Awards:

    Default

    I didn't say they had any known issues, I said they wouldn't be as chock-a-block with security features as personally coded ones.

Posting Permissions

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