Click here to get back home

Download A File

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Download A File M 04-02-2008
Posted by M on April 2, 2008, 12:01 pm
Please log in for more thread options
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



Posted by Ben Morrow on April 2, 2008, 12:13 pm
Please log in for more thread options

> 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


Posted by ccc31807 on April 2, 2008, 12:33 pm
Please log in for more thread options
> 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

Posted by Abigail on April 2, 2008, 12:57 pm
Please log in for more thread options
_
M (no@spam2.tonsjunkmail.com) wrote on VCCCXXVIII September MCMXCIII in
\ 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}'

Similar ThreadsPosted
How to download a .gif file using perl. July 31, 2006, 3:55 pm
Program that download ZIP file from web? September 4, 2006, 4:29 am
download a text file from a URL February 5, 2007, 11:24 pm
download file from Windows Webserver box using LWP November 3, 2005, 4:29 am
search Web for a file type and download them May 27, 2007, 8:16 am
Download MP3 file from site with cookies? July 4, 2007, 12:40 pm
Re: pb download file on internet site April 24, 2008, 11:47 am
Printing Hash Marks During File Download July 31, 2006, 2:01 pm
Further to: Printing Hash Marks During File Download August 5, 2006, 3:11 pm
Why this file download CGI works with Firefox and fails with IE ? November 16, 2007, 1:32 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap