Forum Moderators: mack
I have a website which I designed, however this does not have the upload capability. I need a separate website which I can link to which allows my customers to simply browse to where their photograph folders are stored on their pc's, and upload them.
I can then download the images. I need the images to be uploaded to a secure environment where no one else can access them except myself.
Can anybody advise how I can go about obtaining this feature.
[edited by: engine at 11:49 am (utc) on Mar. 4, 2008]
[edit reason] specifics [/edit]
Is there a reason you can't set up a seperate FTP folder for each client and provide them with a login and password and FTP instructions?
This would be the most efficient way and the easiest for you to maintain and them to use.
Upload Page
<p>You may upload your photo below: </p>
<form action="quickupload.php" method="post" enctype="multipart/form-data">
<p>Your Name:<br>
<input type="text" name="sender_name" size="29"><br>
<br>
E-Mail Address:<br>
<input type="text" name="sender_email" size="29"><br>
<br>
<br>
File to Upload:<br>
<input type="file" name="img1" size="22"><br>
<br>
File to Upload:<br>
<input type="file" name="img2" size="22"><br>
<br>
File to Upload:<br>
<input type="file" name="img3" size="22"><br>
<br>
File to Upload:<br>
<input type="file" name="img4" size="22"><br>
<br>
<input type="submit" name="submit" value="Upload My Photo"> </p>
</form> The processing (quickupload.php)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<?$msg = "Photo Uploaded By\n";
$msg .= "Name: $sender_name\n";
$msg .= "E-Mail: $sender_email\n";
$msg .= "Upload: $img1_name\n";
$msg .= "Upload: $img2_name\n";
$msg .= "Upload: $img3_name\n";
$msg .= "Upload: $img4_name\n\n";
$msg .= "UserIP: $REMOTE_ADDR\n";
$to = "youremail@yourdomain.com";
$subject = "Photo Uploads";
$mailheaders = "From: $sender_email <> \n";
$mailheaders .= "Reply-To: $sender_email\n\n";
mail($to, $subject, $msg, $mailheaders);
if ($img1_name != "") {
@copy("$img1", "/full server path to upload images to/$img1_name")
or die("Couldn't copy the file.");
}
if ($img12_name != "") {
@copy("$img2", "/full server path to upload images to/$img2_name")
or die("Couldn't copy the file.");
}if ($img3_name != "") {
@copy("$img3", "/full server path to upload images to/$img3_name")
or die("Couldn't copy the file.");
}if ($img4_name != "") {
@copy("$img4", "/full server path to upload images to/$img4_name")
or die("Couldn't copy the file.");
}
?>
<html>
<head>
<title>Thank You For Your Submission</title>
<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
</head>
<body>
thanks!
</body>
</html>
Of course you will need to fill in the server paths and your email address etc in quickupload.php. Use at your own risk and make sure to password protect the folder where you would keep this along with building in some spam proofing. I'm not good at PHP at all...hehe