Results 1 to 4 of 4

Thread: Need to know a wget command for php

  1. #1
    Join Date
    Feb 2008
    Posts
    216

    Need to know a wget command for php

    Hi,
    I am working on php mysql environment.
    What i need to know if there is any wget command for php that will enable me to download a file directly from another server to my own server.

  2. #2
    Join Date
    Feb 2008
    Posts
    283

    Re: Need to know a wget command for php

    According to me what you can do is drop the wget idea

    & use this

    PHP Code:
    <?php copy('Remotefile''Localfile'); ?>
    I dont know about the file size though.

  3. #3
    Join Date
    Apr 2008
    Posts
    439

    Re: Need to know a wget command for php

    wget is an amazing Unix tool that I use very often.
    While I did not have SSH access to the old server, but had FTP access. I used the following wget command to log into FTP and download every single file under my home directory to the new server:

    PHP Code:
    wget ---l inf [url]ftp://user:pwd@ftp.example.com/foldername[/url] 
    Within a few minutes all the data had been transferred across.
    I hope this helps you!

  4. #4
    Join Date
    May 2008
    Posts
    3,316

    Re: Need to know a wget command for php

    If you have shell access, you can login, navigate to the directory you want a given file to land in, and use a command like:

    PHP Code:
    wget [url]http://archive.org/thefile.zip[/url] (or whatever it actually is). 
    From the shell, you can execute raw Unix commands. This is like running DOS commands from a command line.

Similar Threads

  1. How to quickly copy file between NAS storage via Wget
    By GuruT in forum Windows Software
    Replies: 5
    Last Post: 27-03-2012, 02:13 PM
  2. Problem with wget
    By Kingfisher in forum Networking & Security
    Replies: 5
    Last Post: 12-12-2009, 12:19 PM
  3. Need GNU Wget for Windows
    By CALANTHIA in forum Windows Software
    Replies: 3
    Last Post: 23-09-2009, 04:50 PM
  4. Replies: 3
    Last Post: 03-09-2009, 05:41 PM
  5. Replies: 1
    Last Post: 18-05-2007, 01:24 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
  •  
Page generated in 1,714,078,756.02613 seconds with 16 queries