Resize Image before upload php
===

    $filename=$_FILES["photo"]["tmp_name"];
    
    $extension=end(explode(".", $filename));
    $newfilename="1.".$extension;
    $target = "image_files/". $newfilename;
    if(move_uploaded_file($_FILES['photo']['tmp_name'], $target))
    {
    echo "Ok";
    }

I have create this code but how i can put re-size the image?? Sorry for my english. 