This work presents the proof of concept of a remote sensing system designed for the detection of molecular species such as gas pollutants via active differential optical absorption spectroscopy in the short- and mid-wavelength infrared. The system includes an optical parametric generator generating broad linewidth pulses tunable between 1.5 and 3.8 ?m. A telescope coupled to a grating spectrograph and an in-house gated HgCdTe avalanche photodiode measures the whole return spectrum from each pulse. Experiments show simultaneous detection in atmospheric air and inside a cell of H2O and CO2 at 2 ?m, and H2O and CH4 at 3.3 ?m. The detection limits for CO2 and CH4 are 158 and 1 ppm·m, respectively. A new algorithm is also presented enabling the determination of concentrations when spectra include strong absorption features.