Synthesis of porous ZnO nanospheres for gas sensor and photocatalysis