Results 1 to 5 of 5
  1. #1
    Full Member
    Join Date
    January 18th, 2005
    Posts
    270
    How exactly do I call wget in php? I have tried the following, but it will not download the file:

    system('wget "ftp://xxx.xxx.com/1.jpg"'); or
    exec ('wget ftp://xxx.xxx.com/1.jpg');

    I know it must be a syntax thing, but I cannot figure it out. Anyone have a good idea?

    Bsnrjones

    Goal: $10,000/month by 12/04

  2. #2
    Member Speedy's Avatar
    Join Date
    January 18th, 2005
    Location
    Lancashire UK
    Posts
    165
    Never heard or come across WGET in PHP.
    From what I know, (not alot!) WGET is a stand alone program.

    To call files from another server or via FTP in PHP is fget and ftp_fget

    More here:
    http://www.phpbuilder.com/manual2/ma...n.ftp-fget.php

  3. #3
    Member Speedy's Avatar
    Join Date
    January 18th, 2005
    Location
    Lancashire UK
    Posts
    165
    Just done a search 'cos i was interested in this little bit of software called WGET. Aint it funny when something is there but you have never heard of it!

    Here is a short Script/Tutorial on using WGET with PHP.

    http://www.zend.com/tips/tips.php?id=91&single=1

  4. #4
    ABW Ambassador CrazyGuy's Avatar
    Join Date
    January 18th, 2005
    Posts
    1,463
    I thought it was only us Perlies that had to resort to wget etc ... doesn't PHP have fopen or something to retrieve files via http?


    --------------
    Are you Crazy?

  5. #5
    Newbie
    Join Date
    January 18th, 2005
    Posts
    3
    fopen() works very well over HTTP

    but if you want to do a bit more advanced stuff, like posting data or set the http-agent etc, then you should look into curl

    http://se.php.net/curl

  6. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Problem with wget download
    By Alwin Augustin in forum Rakuten LinkShare - LS
    Replies: 3
    Last Post: February 24th, 2011, 06:06 PM
  2. PHP question - include(file.php) with variables
    By teezone in forum Programming / Datafeeds / Tools
    Replies: 8
    Last Post: September 4th, 2009, 04:54 PM
  3. Need wget alternative
    By mobilebadboy in forum Programming / Datafeeds / Tools
    Replies: 2
    Last Post: February 20th, 2007, 11:11 PM
  4. Help, wget is eating my bandwidth URGENT
    By tamalyn in forum Midnight Cafe'
    Replies: 12
    Last Post: August 11th, 2003, 05:45 AM

Posting Permissions

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