Hi, I'm searching for a free & easy to use PHP uploading script that allow visitors of my site to upload files to my server and and then to inform me that new files are uploaded. To be more specific - my idea is to make easier the way my visitor to send me files and not to be public shown. Something like yousendit service but I'm the only one recipient. Any ideas ? Thanks in advance for Your help!
Php has built in function for this, $_FILES['UploadFile']['tmp_name']; PM if you need more assistance.
Yes , i'm still opened for more suggestions. Thanks to Sleeping Troll ! @azizny : contact form with attachment is good , but i need the files on my server , not at my email. I'm thinking about image files for example 3-5mb each and to be possible to get multiple files with just one post. Let me explain more - I'm working with graphics and in this way will let my client to submit me pictures directly. And for example some of the packages may be around 50 - 100mb
<form enctype="multipart/form-data" action="upload.php" method="POST"> Please choose a file: <input name="uploaded" type="file" /><br /> <input type="submit" value="Upload" /> </form> This form sends data to the file "upload.php", which is what we will be creating next to actually upload the file.
i m sending you the code this should help you....it uploads the file to the desire location and gives you the server reply about the uploaded file that it is correctly uploaded or not.......hope it helps you..regards.. <?php header('Content-type: application/vnd.wap.xhtml+xml'); ?> <?php echo '<?xml version="1.0"?' . '>'; ?> <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> <html xmlns="http://estudents.co.cc/1999/xhtml"> <head> <title>File Upload Example</title> </head> <body> <h1>Data Received at the Server</h1> <hr/> <p> <?php foreach ($_POST as $key => $value){ ?> <b>Name-value Pair Info:</b><br/> Field name: <?php echo $key; ?><br/> Field value: <?php echo $value; ?><br/><br/> <?php } $optionalFileName = $_POST['filename']; if ($_FILES['myFile']['error'] == UPLOAD_ERR_OK){ $fileName = $_FILES['myFile']['name']; ?> <b>Uploaded File Info:</b><br/> Content type: <?php echo $_FILES['myFile']['type']; ?><br/> Field name: myFile<br/> File name: <?php echo $fileName; ?><br/> File size: <?php echo $_FILES['myFile']['size']; ?><br/><br/> <?php /* Save the uploaded file if its size is greater than 0. */ if ($_FILES['myFile']['size'] > 0){ if ($optionalFileName == "") $fileName = basename($fileName); else $fileName = $optionalFileName; $dirName = '/file_uploads/'; if (move_uploaded_file($_FILES['myFile']['tmp_name'], $dirName . $fileName)){ ?> <b>The uploaded file has been saved successfully.</b> <?php } else{ ?> <b>An error occurred when we tried to save the uploaded file.</b> <?php } } } ?> </p> </body> </html>