#############################################################################################
#Check if the URL(HTTP REFERER) is valid
#############################################################################################
open(REAL,">$directory$filename") || &error($!);
binmode REAL;
print REAL $parts[1];
close(REAL);
if($windows ne 'yes') #chmod it for unix systems
{
`chmod 777 $directory$filename`;
}
#############################################################################################
#Let the user know that the upload's complete and give him the relevant information
#############################################################################################