Reply to Bad renaming

Bad renaming new!
by baambaam, 12 years, 8 months ago
hi
i making name like this:
$los = rand(100,999);
$nam = time() * $los;

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:
$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;
  }
}

any solution?Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important