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
$los = rand(100,999); $nam = time() * $los;
$plik_tmp = $_FILES['plik1']['tmp_name']; if($plik_tmp!="") { srand(); $los = rand(100,999); $name = time() * $los; $foo = new Upload($plik_tmp); if ($foo->uploaded) { $foo->file_auto_rename = false; $foo->allowed = array('image/*'); $foo->file_overwrite = true; $foo->file_name_body_pre = 'd_'; $foo->file_new_name_body = $name; $foo->image_resize = true; $foo->image_convert = jpg; $foo->image_ratio_y = true; $foo->image_x = 600; $foo->Process($folder); $foo->processed; } }
i making name like this:
so its always numbers but script everytime renaming my images example:
this: m_1316741187960.jpg
for this: m_zAz674zz87960.jpg
there is part of my code:
any solution?