Use for rezise:
<?
$str_file_name = $_FILES[ 'str_field_image' ][ 'tmp_name' ];
list( $int_width, $int_height, $und_extras ) = getimagesize( $str_file_name );
$han_image_new = imagecreatetruecolor( $int_resize_width, $int_resize_height );
$han_image = imagecreatefromjpeg( $str_file_name );
@imagecopyresampled( $han_image_new, $han_image, 0, 0, 0, 0, $int_resize_width, $int_resize_height, $int_width, $int_height );
@imagejpeg( $han_image_new, $str_tmp_dir . $str_resize_name );
?>
Use for size limit:
<?
$int_size = filesize( $str_file_name ); //in bytes
?>