Controlled photon emission in porous silicon microcavities