Page 5 of 6 FirstFirst 123456 LastLast
Results 41 to 50 of 59
  1. #41
    Join Date
    Jun 2008
    Location
    Manchester
    Posts
    766
    Tokens
    0

    Default

    Quote Originally Posted by Hamheyelliot View Post
    EDIT: Using $prefix = substr ( md5(uniqid(rand(),1)), 3, 10);
    works now.
    I don't know any php (well small bits) so I don't know what all that other stuff is, but I wouldn't use md5, there's no need for it to be secure and 32 characters is a bit long for a prefix imo.

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

    Latest Awards:

    Default

    Quote Originally Posted by Hamheyelliot View Post
    I don't think that's going to work for DE.
    I have to get extension and all that.

    Working on it anyway.

    EDIT: Using $prefix = substr ( md5(uniqid(rand(),1)), 3, 10);
    works now.
    what the ****. 32 chars + filename + extension.. that's not needed.

  3. #43
    Join Date
    Oct 2007
    Location
    Ireland
    Posts
    2,040
    Tokens
    0

    Latest Awards:

    Default

    I like the concept, and the speeds but the stripes dont agree with my eyes . bit dizzy, but best of look anyhow

    -Kevin
    o.o

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

    Latest Awards:

    Default

    It's okay, I'm going to use a timestamp to control the file name.

    And thanks a lot Kevin

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

    Latest Awards:

    Default

    I would use a system like this to check weather the file exists. $file = the file name. $extention = .gif/.png or what ever-

    PHP Code:
    function checkfile$file$extention ) {
        
    $rand rand"1000""100000" );
        
    $filefull "http://downloadelite.net/files/" $file $rand $extension;
        if ( 
    file_exists $filefull ) ) {
            
    checkfile$file$extension );
        }
        else {
            return 
    $filefull;
        }

    Then save the file as what ever is returned
    Lets set the stage on fire, and hollywood will be jealous.

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

    Latest Awards:

    Default

    Nice idea, will fall back on this is anything should go wrong.
    Only thing I would need to add is the 'echo' tag to show text to the user.

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

    Latest Awards:

    Default

    Using that would be too slow.

    PHP Code:
        public function randomFilename() {
            
    $rand time();
            
    $rand2 rand();
            
    $rand3 rand() + time() - $rand2;
            
    $rand3 floor$rand3 );
            
    $rand sha1$rand );
            
    $rand substr$rand1010 );
            
    $string "$rand2$rand$rand3";
            
    $rand substr$string515 );
            return 
    $rand;
        } 

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

    Latest Awards:

    Default

    The system is fully fledged now!
    File names include the first 4 characters of the file, then a random number assortment!

  9. #49
    Join Date
    Jun 2008
    Location
    Manchester
    Posts
    766
    Tokens
    0

    Default

    It won't allow any files at all and the files dir no longer has an index.

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

    Latest Awards:

    Default

    Whoops, sorted now, moved to a new server, and the Upload Code was missing.
    Going to fix directory index soon.

Page 5 of 6 FirstFirst 123456 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
  •