SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Feb 2004
    Location
    Rome
    Posts
    296
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to download file remotely

    Hello

    I was using this to dowload a file remote http://a.net/n.txt and to store it in my /home/user/

    shell_exec("wget -r -nH --cut-dirs=10 -P /home/user/ http://a.net/n.txt");


    Now my webhoster disabled shell_exec usage and I have to use alternatives ways. How can I reach same goal of the line above using
    only php code ?

    Thank you!
    Graziano
    trcris ::> http://www.trcris.com

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    copy($url, $local_path)

  3. #3
    SitePoint Addict
    Join Date
    Feb 2004
    Location
    Rome
    Posts
    296
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by crmalibu View Post
    copy($url, $local_path)
    Thank you!
    trcris ::> http://www.trcris.com


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
  •