Re: "Copying" a file from another server, help?!?
| From: | Andreas Pour | Date: | Fri, 08 Sep 2000 15:07:06 +0000 |
| Subject: | Re: "Copying" a file from another server, help?!? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-15892@lists.php.net to get a copy of this message | ||
"Boget, Chris" wrote:
>
> > This works for me:
> > <?php
> >
> > $temparray =
> > file("ftp://ramdesigns.com/pub/membership.txt");
> > for ($i=0; $i<count($temparray); $i++) {
> > // Output results one line at a time or write to file,
> > whatever is needed
> > echo "$temparray[$i]<br>";
> > }
> > ?>
>
> In theory, it *should* work for me as well. However, I'm surprised
> the above worked for you because without the 'mode' parameter,
> I get the error "invalid parameter count". Also, while you are not
> logging in as anyone, I must. So my command looks like this:
>
> $fh =
>
> fopen("ftp://user:pass@my.server.com/newsedge_files/newsedge_09-07-2000.zip"Ky3%Ú}Ÿ
> yDúD–1
> , "r");
system("wget
ftp://username:password@my.server.com/newsedge_files/newsedge_09-07-2000.zip");
or maybe s/wget/lynx/ (though I think w/ lynx you set username/pass with
-auth=ID:PASSWD, never tried ftp w/ lynx).
Ciao,
Andreas
http://www.kde.com/ : Everything KDE
http://apps.kde.com/: The Latest in KDE Applications