Renaming Uploaded Files

Discussion in 'General Business' started by Dishin Nutrition, Oct 13, 2007.

  1. #1
    Hello,

    I'm curious to know, but how do sites like TinyPic.com and YouTube rename the files that are uploaded to random characters?
     
    Dishin Nutrition, Oct 13, 2007 IP
  2. pubdomainshost.com

    pubdomainshost.com Peon

    Messages:
    1,277
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Using scripts in the background to generate unique and random names - it could be a perl script or PHP or asp / jsp .. anything that allows you to manipulate anything on server side ...

    Cheers
     
    pubdomainshost.com, Oct 13, 2007 IP
  3. Dishin Nutrition

    Dishin Nutrition Banned

    Messages:
    199
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Any idea what the keywords for my Google search should be?
     
    Dishin Nutrition, Oct 13, 2007 IP
  4. pubdomainshost.com

    pubdomainshost.com Peon

    Messages:
    1,277
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #4
    OK, TinyPic is using PHP . so in google search for
    a. PHP + File Upload
    simillarly for other scripts .. it should be SCRIPT File Upload.

    Q. What do you really wish to achieve?
     
    pubdomainshost.com, Oct 13, 2007 IP
  5. Dishin Nutrition

    Dishin Nutrition Banned

    Messages:
    199
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I am a PHP coder myself and I was just wondering how it's done. It might be something that could come in handy one day.
     
    Dishin Nutrition, Oct 13, 2007 IP
  6. pubdomainshost.com

    pubdomainshost.com Peon

    Messages:
    1,277
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Check File Upload options .. generally you save files with a tmp name - and all scripts allow rand / random functions...

    Cheers
     
    pubdomainshost.com, Oct 13, 2007 IP
  7. aras

    aras Active Member

    Messages:
    533
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #7
    It is a very simple process, you need to learn it before you can name yourself as a php developer. Check move_uploaded_file() for uploading files, rand() for randomization.
     
    aras, Oct 13, 2007 IP