Upload System

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Upload System

    Ok

    This time i need some advice.
    I'm deleting all members directories cause now i'm using wildcard dns.

    Now, with the user files i'm only gana use one directory, and mysql download system.

    I want to upload the files, and sort of get the extention, example .mp3 and rename the rest of the file before the .mp3 with md5 and only keep the real filename in database.

    Only example...
    Say now i'm a user, and i upload a file to the directory: I_beg_your_poden.mp3
    then it must rename that file in md5 564ffe65454c24f4489ea54d.mp3

    I want to do this for security isues...

    If someone could maybe help me out with some source.

    Click here!!!

    #2
    I know my renaming will look something like this
    Code:
    rename("Oldname",md5("Newname."));
    But how do i get the file extention

    Click here!!!

    Comment


      #3
      I know my renaming will look something like this
      Code:
      rename("Oldname",md5("Newname."));
      But how do i get the file extention[/b]
      Easy, use array_reverse at the varable then explode . and ur good to go

      Comment


        #4
        Easy, use array_reverse at the varable then explode . and ur good to go[/b]
        Maybe an example?

        Click here!!!

        Comment


          #5
          Maybe an example?[/b]
          havnt test it should work tho, try it
          Code:
          <? $link="file.mp3";
          $ext=array_reverse($link);
          $exp=explode(".", $ext); //$exp[0] would be like mp3  ?>

          Comment


            #6
            Thank you

            Click here!!!

            Comment

            Working...
            X