Measuring the temperature of hot nuclear fragments