A man who fired at two Pinellas Park police officers two years ago, hitting one in the arm, was sentenced Thursday to life in prison.