D
dtfcalibrator
After executing the following code, all http requests to the server
don't work for ~1 minute. I have cpanel installed on another port, and
that stops responding as well. Any idea why this would happen?
use Net::FTP;
use File::Copy;
# example call:
# &sendFileToFTP('file.zip');
sub sendFileToFTP{
$fileToTransmit = $_[0];
$lower=10000;
$upper=99999;
$random = int(rand( $upper-$lower+1 ) ) + $lower;
copy("$fileToTransmit","$random\.zip") or die("Error copying: $!");
$ftp = Net::FTP->new("ftp.myupload.com, Debug => 0) or die $@;
$ftp->login("user,pass) or die $ftp->message;
$ftp->binary();
$ftp->put($random."\.zip") or die $ftp->message;
$ftp->quit;
unlink "$random\.zip";
};
don't work for ~1 minute. I have cpanel installed on another port, and
that stops responding as well. Any idea why this would happen?
use Net::FTP;
use File::Copy;
# example call:
# &sendFileToFTP('file.zip');
sub sendFileToFTP{
$fileToTransmit = $_[0];
$lower=10000;
$upper=99999;
$random = int(rand( $upper-$lower+1 ) ) + $lower;
copy("$fileToTransmit","$random\.zip") or die("Error copying: $!");
$ftp = Net::FTP->new("ftp.myupload.com, Debug => 0) or die $@;
$ftp->login("user,pass) or die $ftp->message;
$ftp->binary();
$ftp->put($random."\.zip") or die $ftp->message;
$ftp->quit;
unlink "$random\.zip";
};