For a question in forum this is a working example, there will be the example that is not working

Dependencies:   mbed

Fork of eth_v13 by Heiko Greiner

Committer:
hggerdd
Date:
Thu Mar 27 21:55:57 2014 +0000
Revision:
4:a10e3d1bdb17
Parent:
3:79dc3337d9da
working with wiznet w5100

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hggerdd 2:8f5bacfef390 1 #ifndef HTML_H_
hggerdd 2:8f5bacfef390 2 #define HTML_H_
hggerdd 2:8f5bacfef390 3
hggerdd 4:a10e3d1bdb17 4 const char html_head[] = "<html><meta http-equiv=\"refresh\" content=\"5\">\r\n<body>\r\n" \
hggerdd 4:a10e3d1bdb17 5 "<title>Webserver </title>\r\n" \
hggerdd 4:a10e3d1bdb17 6 "<h2>Webserver using Wiznet W5100 chip</h2>\r\n";
hggerdd 3:79dc3337d9da 7
hggerdd 3:79dc3337d9da 8 const char html_foot[] ="<br /><hr></html>\r\n";
hggerdd 3:79dc3337d9da 9
hggerdd 4:a10e3d1bdb17 10 /* html Tabelle */
hggerdd 4:a10e3d1bdb17 11 const char html_table_head[] = "<table border=\"1\">";
hggerdd 4:a10e3d1bdb17 12 const char html_table_foot[] = "</table>";
hggerdd 4:a10e3d1bdb17 13
hggerdd 3:79dc3337d9da 14
hggerdd 3:79dc3337d9da 15 const char c_HTTP_200_OK[] = "HTTP/1.0 200 OK\r\n";
hggerdd 3:79dc3337d9da 16 const char c_HTTP_404_NotFound[] = "HTTP/1.0 404 Not Found\r\n";
hggerdd 3:79dc3337d9da 17
hggerdd 3:79dc3337d9da 18 /* Cache Control */
hggerdd 3:79dc3337d9da 19 const char c_HTTP_CacheControl_NoCache[] = "Pragma: no-cache\r\nExpires: Fri, 01 Jan 1990 00:00:00 GMT\r\nCache-Control: no-cache, must-revalidate\r\n";
hggerdd 4:a10e3d1bdb17 20 const char http_refresh[] = "<head><meta http-equiv=\"refresh\" content=\"5\"></head>";
hggerdd 3:79dc3337d9da 21 /* Content Types */
hggerdd 3:79dc3337d9da 22 const char c_HTTP_Content_HTML[] = "Content-Type: text/html\r\n";
hggerdd 3:79dc3337d9da 23 const char c_HTTP_Content_Javascript[] = "Content-Type: text/javascript\r\n";
hggerdd 3:79dc3337d9da 24 const char c_HTTP_Content_Bmp[] = "Content-Type: image/bmp\r\n";
hggerdd 3:79dc3337d9da 25 const char c_HTTP_Content_Ico[] = "Content-Type: image/ico\r\n";
hggerdd 3:79dc3337d9da 26 const char c_HTTP_Content_Jpeg[] = "Content-Type: image/jpeg\r\n";
hggerdd 3:79dc3337d9da 27 const char c_HTTP_Content_Gif[] = "Content-Type: image/gif\r\n";
hggerdd 3:79dc3337d9da 28 const char c_HTTP_Content_Png[] = "Content-Type: image/png\r\n";
hggerdd 3:79dc3337d9da 29
hggerdd 3:79dc3337d9da 30 /* Content Length */
hggerdd 3:79dc3337d9da 31 const char c_HTTP_Content_Length[] = "Content-Length: ";
hggerdd 3:79dc3337d9da 32
hggerdd 3:79dc3337d9da 33 /* Empty Line */
hggerdd 3:79dc3337d9da 34 const char c_HTTP_EmptyLine[] = "\r\n";
hggerdd 3:79dc3337d9da 35
hggerdd 3:79dc3337d9da 36 /* File Extensions */
hggerdd 3:79dc3337d9da 37 const char c_HTTP_FileExtension_Htm[] = "htm";
hggerdd 4:a10e3d1bdb17 38 const char c_HTTP_FileExtension_Js[] = "js";
hggerdd 3:79dc3337d9da 39 const char c_HTTP_FileExtension_Bmp[] = "bmp";
hggerdd 3:79dc3337d9da 40 const char c_HTTP_FileExtension_Ico[] = "ico";
hggerdd 3:79dc3337d9da 41 const char c_HTTP_FileExtension_Jpg[] = "jpg";
hggerdd 3:79dc3337d9da 42 const char c_HTTP_FileExtension_Gif[] = "gif";
hggerdd 3:79dc3337d9da 43 const char c_HTTP_FileExtension_Png[] = "png";
hggerdd 3:79dc3337d9da 44
hggerdd 3:79dc3337d9da 45 const char c_HTTP_Page_404[] = "<html><body><div id=\"title\" style=\"width: 800px; margin: 0 auto; text-align:center\"><h1>TheUno WebServer - Error 404</h1></div><br /><div id=\"text\" style=\"width: 800px; margin: 0 auto; text-align:center\"><p>The page requested was not found. Please click <a href=\"index.htm\">this link</a> to return on the main page of the WebServer.</p></div></body></html>\r\n";
hggerdd 3:79dc3337d9da 46
hggerdd 2:8f5bacfef390 47
hggerdd 2:8f5bacfef390 48 #endif