D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Download script

 

Quoting Alex Charrett <alex@xxxxxxxxxxxx>:

Quoting Rob Beard:

I guess I'm looknig for something like a web based download manager.  My 
knowledge of PHP at the moment is very sketchy (i.e. non existent!) so I
was
someone might know something that would do the job?

For a really quick, dirty and not very elegant bit of perl to do the job:

#!/usr/bin/perl

use CGI qw(param);

$url=param("url");

system("cd /writeable/dir;nohup wget $url < /dev/null &");

print "Content-type: text/plain\n\n";
print "Now downloading $url\n";



Cheers, that might do the job.  I take it I just put that in a file, point the 
browser at the remote end to this file?

How do I tell it what filename to use, would I just add something to the end 
of the url?

I don't mind how elegant it is, just want something to start it downloaded so 
when I get home it should hopefully be finished.

Rob




--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.