I want customers to be able to upload photos to my site so I can print them. The files will not actually go onto the site but into a secure area where I can access them and download. Clearly this needs to be secure as I don't want the site hacked or misused in any way so what is the best way for this? I don't really know php so something easy to understand would be great! I heard php was best for this thing? Thanks
I'd say your easiest bet would be getting any free image uploader from the internet (as you don't know PHP) - there's always a few free ones around. Then, protect your uploads/ folder (or similar) with .htaccess authentication so only you can access them, even the one that comes with cPanel should work. That should get you going Jay P.S. Yes, PHP is the best language for this.
I can create this simple script for you at low cost and have it secure etc for you contact me via PM if your interested!
php uses $_file to retrieve form data with file path, it uploads to a temp name in a secure area of server. from here you can check file if need be(filetype etc.), before saving it with: move_uploaded_file($_FILES['UploadFile']['tmp_name'],$file) where $file is save path. If you save to a folder without execute permissions you should have no problem. The site I am currently building does exactly what you are asking http://trollnest.com/bragflags/project.php
Have the website upload to a directory to your server, which can be prevent public access using a .htaccess file. Then, when you want to retrieve the files, simple go into the FTP of the website directory and download the files. I hope that helps Regards
//create a form in html with a name of ="Upload Image" //Use this script if($_POST["action"] == "Upload Image") { echo "<meta http-equiv='refresh' content='0;url=upload.php'>"; unset($imagename); if(!isset($_FILES) && isset($HTTP_POST_FILES)) $_FILES = $HTTP_POST_FILES; if(!isset($_FILES['image_file'])) $error["image_file"] = "An image was not found."; $imagename = basename($_FILES['image_file']['name']); if(empty($imagename)) $error["imagename"] = "The name of the image was not found."; if(empty($error)) {if(empty($numq)) {if($numall>=5) {echo "Limit Exceeded!";}else {$newimage = "images/" . $imagename; $result = @move_uploaded_file($_FILES['image_file']['tmp_name'], $newimage); $upd= @mysql_query("INSERT INTO up_tb (title,photo,altg,descrip,pid) VALUES ('$imagename','title','EnterTagsHere','DescriptionHere','$pi')"); }
In case you don't know how to do this in html use this <form method="POST" enctype="multipart/form-data" name="image_upload_form" action="<?$_SERVER["PHP_SELF"];?>"> <p><input type="file" name="image_file" size="20"></p> <p><input type="submit" value="Upload Image" name="action"></p> </form> and the php i posted above.. and there you go..