Put 2 codes together! (School project)

Ok. Thank u! Mabye i should try that. But this is my first project with this esp8266 wifi thing, so im not sure how to do that the arduino is telling the server when the led is on/of? Do u have a code for that?

Maybe i can use the output from server(arduino) as an input to my arduino(clapper)?