Download A File

I have a script in /cgi-bin/. I want it when called to download a dynamic
file, actually an image to a file on the server. Basically pull a graph
from whats actually a router of mine, save it to /temp_images.

I have tried using: "system "/usr/bin/wget..." with no luck.

Can someone give me a shove in the right direction? I cannot seem to find
where the perl "get" command supports simply saving to a directory but I may
have missed something and many times do.

Thanks.

Matt
M [ Mi, 02 April 2008 18:01 ] [ ID #1934221 ]

Re: Download A File

Quoth "M" <no [at] spam2.tonsjunkmail.com>:
> I have a script in /cgi-bin/. I want it when called to download a dynamic
> file, actually an image to a file on the server. Basically pull a graph
> from whats actually a router of mine, save it to /temp_images.
>
> I have tried using: "system "/usr/bin/wget..." with no luck.

An actual error message is more use than 'no luck'. Does your wget live
in /usr/bin (mine doesn't)?

> Can someone give me a shove in the right direction? I cannot seem to find
> where the perl "get" command supports simply saving to a directory but I may
> have missed something and many times do.

See LWP::Simple::getstore.

Ben
Ben Morrow [ Mi, 02 April 2008 18:13 ] [ ID #1934226 ]

Re: Download A File

On Apr 2, 12:01 pm, "M" <n... [at] spam2.tonsjunkmail.com> wrote:
> I have a script in /cgi-bin/. I want it when called to download a dynamic
> file, actually an image to a file on the server. Basically pull a graph
> from whats actually a router of mine, save it to /temp_images.
>
> I have tried using: "system "/usr/bin/wget..." with no luck.
>
> Can someone give me a shove in the right direction? I cannot seem to find
> where the perl "get" command supports simply saving to a directory but I may
> have missed something and many times do.
>
> Thanks.
>
> Matt

We have successfully used pscp for going on several years to upload
and download all kinds of files, large and small.

www.chiark.greenend.org.uk/~sgtatham/putty/download.html

CC
cartercc [ Mi, 02 April 2008 18:33 ] [ ID #1934230 ]

Re: Download A File

_
M (no [at] spam2.tonsjunkmail.com) wrote on VCCCXXVIII September MCMXCIII in
<URL:news:4fGdnYBx67IlMG7anZ2dnUVZ_viunZ2d [at] haugcommunications>:
\\ I have a script in /cgi-bin/. I want it when called to download a dynamic
\\ file, actually an image to a file on the server. Basically pull a graph
\\ from whats actually a router of mine, save it to /temp_images.
\\
\\ I have tried using: "system "/usr/bin/wget..." with no luck.

Perhaps /usr/bin/wget... doesn't exist? I dunno, just guessing as you
don't give any clue what so ever what goes wrong. Perhaps you are working
on a Windows machine?



Abigail
--
perl -e 'for (s??4a75737420616e6f74686572205065726c204861636b65720as?;??; ??)
{s?(..)s\??qq \?print chr 0x$1 and q ss\??excess}'
Abigail [ Mi, 02 April 2008 18:57 ] [ ID #1934231 ]
Perl » comp.lang.perl.misc » Download A File

Vorheriges Thema: Re: BEGIN, INIT etc...
Nächstes Thema: Re: Parse x.500 DN and change order displayed