The position of the photonic band gap of a metal oxide inverse opal, so the reflection of light of a certain wavelength range, is used as an optical sensor signal to detect gases and liquids. This band gap is, beside others, determined by the refractive index of the metal oxide and the fluid in the pores. Changing one of them results in a band gap shift. The optical read out of a sensor signal does not require a direct contacting of the transducer and so a remote read out in harsh environments is possible. Tungsten oxide inverse opals were used as transducers. For this purpose the synthesis of tungsten oxide inverse opals was investigated and optimized. As sensing mechanism for the optical hydrogen sensor the intercalation of hydrogen into the tungsten oxide lattice and the temperature dependent back reaction were clarified. The optical gas detection was realized basing on a tungsten oxide inverse opal for hydrogen detection. Hydrogen concentrations are detected from 3000 ppm to 10 %. This is possible at least up to 500 C. The refractive index of liquids can be measured with tungsten oxide inverse opals, the responsiveness corresponds to a glucose concentration of 8.4 g/L. Beside this the stability of indium oxide inverse opals, a possible transducer for gas sensing in harsh environments, is tested up to temperatures of 550 C. For the sensing applications different custom build measurement setups are compared and optimized.