#!/usr/local/bin/perl ##################################################### #{EZ-Loader}# #created 4-14-2000# #No Copyright# #http://nccgn.tripod.com/scripts# ##################################################### #start script module use LWP::Simple; use CGI qw(param); # Done ##################################################### #the path variable is a vital variable in using this script# #it gives the path to the directory where the# #files are saved# ##################################################### #start variables $path = "/root/path/to/dir"; $file = param("file"); $new_name = param("new_name"); $url = param("url"); $upload = get($file); # Done print "Content-type:text/html\n\n"; if ($ENV{'CONTENT_LENGTH'} eq "") { print < EZ-Loader

EZ-Loader


To use EZ-Loader, enter an HTTP url in the *URL* field. Then type the name you'd like the file to be saved as in the *NEW NAME* field and click *Upload*.
URL:
New Name:

Script by: {nccgn scripts}

EOF } else { if ($file eq "" || $new_name eq "") { &error; } if ($file ne "" && $new_name ne "") { open(NEW,">$path/$new_name"); print NEW "$upload"; close(NEW); print "

Success

\n\n"; print "\n"; print "
Your file has been uploaded and renamed to $new_name

Saved as: $new_name

Script by: {nccgn scripts}

\n"; } } sub error { print "

You have an error


PRESS BACK!
\n"; exit; } exit;