needed a php file upload script

Discussion in 'PHP' started by dizaztah, May 26, 2009.

  1. #1
    hi i was searching for a php script that could upload any files with the extension like jpg, gif, mp3, swf, png etc to a folder on my host server.

    and also is it possible to fetch the files on other's server to my own server direct from the download link like http://domain.com/mp3/akon.mp3 direct download to a folder in my server. plz help needed does anyone have this type of upload script for free.
     
    dizaztah, May 26, 2009 IP
  2. Topunit

    Topunit Peon

    Messages:
    95
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you are 'searching' for something, search on Google not on a discussion forum.

    Yes, it's possible to fetch files from an external location. This will grab the file and save it as akon.mp3.
    <?file_put_contents('akon.mp3', file_get_contents('http://domain.com/mp3/akon.mp3'))?>
    Code (markup):
     
    Topunit, May 26, 2009 IP
  3. dizaztah

    dizaztah Greenhorn

    Messages:
    12
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    13
    #3
    i didnt found any script like that so i thought somebody might me using it and thought they would share with me. im a total rookie in php. where do i add that code?
     
    dizaztah, May 26, 2009 IP
  4. Topunit

    Topunit Peon

    Messages:
    95
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    There's hundreds of free uploading scripts. If you don't like any of them you can learn PHP - it's easier than you think, or pay someone to do it.
    tizag.com/phpT/ - there's a section on there for file uploading.

    Make a new file called script.php and paste the code there.
     
    Topunit, May 26, 2009 IP
  5. AaliyahRoma

    AaliyahRoma Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    This is an example how to upload image files with php. Remove preg_match("#^image/#i", $_FILES[$k]['type']) && to upload non-image files too.
     
    AaliyahRoma, May 26, 2009 IP
  6. K1llswitch

    K1llswitch Member

    Messages:
    84
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #6
    php.net/copy
     
    K1llswitch, May 26, 2009 IP
  7. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #7
    Search for mini file host
     
    Bohra, May 27, 2009 IP
  8. easydolla

    easydolla Peon

    Messages:
    403
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Its actually pretty simple to code a file upload script. If you want my code, PM me.
     
    easydolla, May 27, 2009 IP