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.
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):
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?
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.
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.