Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Howto transfer file from one server to another server online ?

  1. #1
    intelli is offline Experienced Net Builder
    Join Date
    Jan 2009
    Posts
    140
    Blog Entries
    2
    Thanks
    43
    Thanked 11 Times in 9 Posts

    Howto transfer file from one server to another server online ?

    Hi,

    What I want to know is this :-

    Suppose there is a website which provides free songs. Also there is a link to the songs.

    Now, what if I want to copy them to my server? I don't want to download those BIG files to my computer and then again upload those BIG files to my server. I want to do it online without wasting any time of mine.

    Can it be done???

    Anyone? I think its possible using the command line ( SSH etc) !!

  2. #2
    Mr.Bill's Avatar
    Mr.Bill is offline One is glad to be of service
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828
    Blog Entries
    1
    Thanks
    72
    Thanked 350 Times in 182 Posts
    PHP Code:
    <?php
    define
    ('BUFSIZ'4095);
    $url 'http://www.example.com/example.zip';
    $rfile fopen($url'r');
    $lfile fopen(basename($url), 'w');
    while(!
    feof($rfile))
    fwrite($lfilefread($rfileBUFSIZ), BUFSIZ);
    fclose($rfile);
    fclose($lfile);
    ?>

    Change the $url value with the url of the file which you want to download..
    Just put this script in the folder where you want to download the file to.. Change the permissions of the folder to writable..
    Now just access the script url via your web browser and wait for the page to load completely, Once fully loaded, the remote file should be on your server..

    Reverse IP Check ಠ_ಠ Proxy Sites
    <?php if ($youask == 'stupid question') { echo ('stupid answer'); } ?>

  3. Thanked by:

    intelli (2 June, 2009)

  4. #3
    intelli is offline Experienced Net Builder
    Join Date
    Jan 2009
    Posts
    140
    Blog Entries
    2
    Thanks
    43
    Thanked 11 Times in 9 Posts
    Well, will it take the same time for doing the transfer this way like we do manually ?
    I mean suppose I want to transfer a 100 GB file, then how long with the page take to load completely?

  5. #4
    Mr.Bill's Avatar
    Mr.Bill is offline One is glad to be of service
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828
    Blog Entries
    1
    Thanks
    72
    Thanked 350 Times in 182 Posts
    Could do some research on ssh + wget to download files I cant even say the script will work on your server. Or how fast it will download, but its faster then downloading and uploading. You can use another tab to continue about your business on the web.

    Reverse IP Check ಠ_ಠ Proxy Sites
    <?php if ($youask == 'stupid question') { echo ('stupid answer'); } ?>

  6. #5
    intelli is offline Experienced Net Builder
    Join Date
    Jan 2009
    Posts
    140
    Blog Entries
    2
    Thanks
    43
    Thanked 11 Times in 9 Posts
    Thanks for the info Mr.Bill

  7. #6
    Mr.Bill's Avatar
    Mr.Bill is offline One is glad to be of service
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828
    Blog Entries
    1
    Thanks
    72
    Thanked 350 Times in 182 Posts
    To make it easy log into your ssh and the cd to the directory you want the file to be put ie cd /home/intelli/downloads then using the wget command type in wget http://example.com/example.zip and your file will be saved in the folder you picked.

    Reverse IP Check ಠ_ಠ Proxy Sites
    <?php if ($youask == 'stupid question') { echo ('stupid answer'); } ?>

  8. Thanked by:

    intelli (2 June, 2009)

  9. #7
    dtkguy's Avatar
    dtkguy is offline Still Learnin'
    Join Date
    Dec 2008
    Posts
    391
    Thanks
    7
    Thanked 164 Times in 108 Posts
    Using the php file to download large files would not work. You'd reach your server's max execution time well before a very large file could be completely downloaded.

    As Mr.Bill said in is second reply, wget would probably be the best bet. Or if the files are on ftp possibly an fxp transfer.

  10. #8
    intelli is offline Experienced Net Builder
    Join Date
    Jan 2009
    Posts
    140
    Blog Entries
    2
    Thanks
    43
    Thanked 11 Times in 9 Posts
    I want to know whether the wget command would do it instantly or not? If it does instantly then its what I was looking for. Will it transfer instantly even big files?

  11. #9
    dtkguy's Avatar
    dtkguy is offline Still Learnin'
    Join Date
    Dec 2008
    Posts
    391
    Thanks
    7
    Thanked 164 Times in 108 Posts
    It can only transfer as fast as your server connection. If you've got a constant lets say 100Mps connection downloading a 100GB file it would take about 2 Hours 23 Minutes 9.93 Seconds to download that file. That's the theoretical fastest, with your connection using its full potential, which is hardly ever the case.

  12. Thanked by:

    intelli (3 June, 2009)

  13. #10
    intelli is offline Experienced Net Builder
    Join Date
    Jan 2009
    Posts
    140
    Blog Entries
    2
    Thanks
    43
    Thanked 11 Times in 9 Posts
    So it's all about the speed of the sever right? and not about the speed of my internet connection? Correct me if I'm wrong.

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 2
    Last Post: 21 August, 2009, 22:52 PM
  2. Replies: 2
    Last Post: 14 May, 2009, 09:21 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •