Technical improvement for producing porous polymer microspheres in foam phase