Macroporous silicon (MPS) has been shown to be a promising material in many areas of technical interest. In particular, MPS has been applied for electronic devices and microfluidic applications. One of the most promising features of MPS is that it enables the development of optical applications using simple and cost-effective technology, compatible with MEMS fabrication processes and suitable for mass production. This chapter describes the application of MPS structures fabricated using electrochemical etching (EE) for the detection of gases of environmental concern in the wavelength range comprising 4 μmt o1 5μm, such as CO 2. Vertical-modulated MPS structures are reported, whose photonic bandgaps can be placed at different wavelengths depending on the application needs. These structures have been applied to the quantification of CO 2 , and these results are summarised here. Detection is performed by the direct measure of absorption, obtaining promising results with short optical paths.