We present a novel optical method, to our knowledge, to measure the refractive index of liquids by means of the images produced by an optofluidic lens. In addition we propose a new method to make optofluidic lenses.