Steady state photoluminescence technique is proposed for the measurement of the diffusion of oxygen into porous silicon (PS). In this work, the PS layers on n-type Si substrates were prepared by anodic etching in hydrofluoric (HF) acidic solution at a dc current under white light illumination. The PS layers with three different pore sizes (0.7, 1.9, and 4.5 mu m) were obtained by etching in different HF concentrations in ethanol (from 33% to 67%). The effect of the pore size on the oxygen diffusion was performed at room temperature. In addition to the pore size, the effect of the temperature on the oxygen diffusion was also studied at 35, 45, and 65 degrees C for PS layer with 1.9 mu m pore size. It was observed that the diffusion of the oxygen to PS layers takes place in two different stages. In the first stage, the oxygen molecules are adsorbed on the surface of the PS layer while they diffuse through into the pores in the second stage. For all cases the diffusion in the first stage is much faster than the second stage. The oxygen diffusion increases as the pore size and the temperature increase in the first stage. In the second stage, while the diffusion increases with the pore size, it almost does not change with temperature. (C) 2017 Elsevier B.V. All rights reserved.