// Present a "Will be back soon web page", as stand-in webserver. // 2011-01-30 http://opensource.org/licenses/mit-license.php #include // ethernet mac address - must be unique on your network static byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 }; byte Ethernet::buffer[500]; // tcp/ip send and receive buffer char page[] PROGMEM = "HTTP/1.0 503 Service Unavailable\r\n" "Content-Type: text/html\r\n" "Retry-After: 600\r\n" "\r\n" "" "" "Service Temporarily Unavailable" "" "" "

This service is currently unavailable

" "

" "The main server is currently off-line.
" "Please try again later." "

" "" "" ; void setup(){ ether.begin(sizeof Ethernet::buffer, mymac); ether.dhcpSetup(); } void loop(){ // DHCP expiration is a bit brutal, because all other ethernet activity and // incoming packets will be ignored until a new lease has been acquired if (ether.dhcpExpired()) ether.dhcpSetup(); // wait for an incoming TCP packet, but ignore its contents if (ether.packetLoop(ether.packetReceive())) { memcpy_P(ether.tcpOffset(), page, sizeof page); ether.httpServerReply(sizeof page - 1); } }