Web control + 40 Relays

Hi, i just ask how i can control 40 relays on the web.? What will i do

Are all of the 40 relays in the same location or all different locations?

http://uselect-el.ucoz.com/pics/robospider_page2.jpg - I made such project on mega2560 + ethernet shield.

You need 40 buttons

mega2560 has > 48 outputs

+ethernet shield