"Ken" wrote:
"steve" <Us************@dbForumz.com> wrote in message
news:4135101a
_4@alt.athenanews.com...
"Ken" wrote: > How do I call c:\wget\wget.exe from a php or html file? so I can use > php
> variables to define the file names to download.
>
> I want to set up wget to download several files from a
server to my > hard
> drive so they can be used internally.
>
> Ken
Ken, as php can read remote files, why do you need to use wget?
Just juse fopen/fread...
Steve,
I need the files on my hard drive. i use them off the web.
Ken
Ken, what I am suggesting is that you can fread the remote files via
http, and then just save them to hard disk from php. It is very
simple, and you have much better control over what is going on
(timeout, etc.) since you are working within php.
from the manual:
<?php
$handle = fopen("http://www.example.com/", "rb");
$contents = ’’;
while (!feof($handle)) {
$contents .= fread($handle, 8192);
}
fclose($handle);
?>
--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL:
http://www.dbForumz.com/PHP-wget-ftopict144855.html
Visit Topic URL to contact author (reg. req'd). Report abuse:
http://www.dbForumz.com/eform.php?p=486668