Hello, I am trying to upload files directly into the server without downloading in my pc then upload to server. How can i do this?? Like a file is located in www.anysite.com/sample.exe. without downloading the file into my pc then upload it it will be downloaded into the server. help plz
use the following command in your shell in the directory you want the file downloaded to wget http://www.anysite.com/sample.exe Code (markup): Or if you dont have Shell Access, use this php code, just put it in download.php and run it from your web browser after uploading it to the server <?php $url = "http://www.anysite.com/sample.exe"; // URL of file you want to download $file = "sample.exe"; // File to save it as on the server $ch = curl_init($url); $fp = fopen($file, 'w'); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); fclose($fp); ?> Code (markup):
I was in the same situation like you. I have started a thread that time and did find some cool answers for that. Well, if i am right - i think someone suggested flashfxp - which is an ftp client that helps us do just that. Yes, i have tried that myself and was successful.