Hello I am looking for a simple secure solution to let people upload photos and images from a website . Free would be cool. I need the users to register in order to upload
Here has written two unpretentious scripts UPLOAD. 1 script loading of files from your computer. 2 script loading of files from the removed computer. The Truth there is one minus I still a filtration has not written for them, therefore they load any files. 1 script <? echo <<<HTML <form enctype="multipart/form-data" action="$self" method="POST"> <input type="hidden" name="ac" value="upload"> <tr> <td>File:</td> <td><input size="48" name="file" type="file"></td> </tr> <tr> <td>Path:</td> <td><input size="48" name="path" type="text"><input type="submit" value="OK"></td><br> HTML; if (isset($_POST['path'])){ $uploadfile = $_POST['path'].$_FILES['file']['name']; if ($_POST['path']==""){$uploadfile = $_FILES['file']['name'];} if (copy($_FILES['file']['tmp_name'], $uploadfile)) { echo "OK $uploadfile\n"; echo "Name:" .$_FILES['file']['name']. "\n"; echo "Ves:" .$_FILES['file']['size']. "\n"; } else { print "Error:\n"; print_r($_FILES); } } ?> Code (markup): 2 script <? echo "<form enctype='multipart/form-data' action='?ac=upload&status=ok' method=post> <input type='text' name='file3' value='http://' size=40><br> ServerPath: <br> <input type='text' name='file2' value='$docr/' size=40><br> <input type='submit' value='OK'></form>"; if (!isset($status)) downfiles(); else { $data = @implode("", file($file3)); $fp = @fopen($file2, "wb"); @fputs($fp, $data); $ok = @fclose($fp); if($ok) { $size = filesize($file2)/1024; $sizef = sprintf("%.2f", $size); print "<br><center>OK: <b>ves <u>$file2</u> ves</b> (".$sizef."??) </center>"; } else { print "<br><center><font color=red size = 2><b>error</b></font></center>"; } } ?> Code (markup):
thanks for you help, I have downloaded some of the scripts, I test them this week. I am still taking any food idea