class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
more info about the class
See all posts See thread Reply
if (isset($_POST['submit'])){ $img_name = md5(date("Y-m-d H:i:s").$_FILES['image']['name']); $upload = new upload($_FILES['image']); $upload->file_new_name_body = $img_name; /* $upload->image_resize = true; $upload->image_convert = 'jpg'; $upload->image_ratio_y = true; $upload->image_x = 700; */ $upload->process('upload/'); echo $upload->error; echo $upload->log; }
if (isset($_POST['submit'])){ $img_name = md5(date("Y-m-d H:i:s").$_FILES['image']['name']); $upload = new upload($_FILES['image']); $upload->file_new_name_body = $img_name; /* $upload->image_resize = true; $upload->image_convert = 'jpg'; $upload->image_ratio_y = true; $upload->image_x = 700; */ $upload->process('upload/'); echo $upload->error; echo $upload->log; }