How to control esp2866 using other wifi connection

well yeah that's all I got for the meantime I just thought static IP would solve my problem I'm still gathering infos