Forum Moderators: coopster
Here is the script:
[URL="http://www.zend.com/tips/tips.php?id=91&single=1"]http://www.zend.com/tips/tips.php?id=91&single=1[/URL]
I know where the path to wget on my server (/usr/bin/wget), but i'm not sure what to put in the following:
[LIST]
I guess I am not sure of the "format" I need to enter for these vars.
Perhaps a dummy example would be of help.
Thanks so much.
You could also try a google search [google.com].
If the connection is slow and the file lengthy then the download will most likely fail.
Try something like this:
exec("/usr/bin/wget --tries=45 http://example.com/jpg/flyweb.jpg");
[edited by: coopster at 9:44 pm (utc) on Jan. 2, 2007]
[edit reason] generalized url [/edit]
exec("/usr/bin/wget http://example.com/jpg/flyweb.jpg");
That should work, and save flyweb.jpg to the current directory. But if it fails, it won't tell you why. Also, the current directory might not be where you want it saved. Also, if you're running this under a Web server, it might not have permission to write to the current directory.
[edited by: coopster at 9:44 pm (utc) on Jan. 2, 2007]
[edit reason] generalized url [/edit]