Web applications with embedded HTTP server are becoming popular because writing user interface in HTML is much easier than in many other languages, and the same applications may be transferred to a dedicated server with only small changes. The simple web server by Sergey Lyubka has been added to Z-Script library for using Z-Script as embedded CGI. The library has been used with the embedded web browser to deliver demo CDs of a world air CO2 database.
| Function | Parameter Type | Remark |
| httpd(port[, url, func, flag...) | number, strings, string, true/false | Starts the HTTP server on the port number. URLs can be registered to the server to be processed by Z-Script functions when clients request the URLs. If the flag is true, the Z-Script functions should be written as a template handler; otherwise as a CGI handler. The server calls the functions with the socket as a parameter of user object. |
| w3get(socket, name) | user, string | Get the named HTTP parameter passed to Z-Scri pt from the GET or POST method of a CGI form. Displays a message. |
| w3send(socket, text) | user, string | Sends the string the server socket. |
| w3write(socket, ptr, n) | user, user, integer | Write n-bytes of raw data at memory address ptr to the server socket. |