From 10167482a9fd147985d9b8f568014e447080abad Mon Sep 17 00:00:00 2001 From: Stefan de Konink Date: Sun, 21 Feb 2010 05:00:17 +0100 Subject: [PATCH] Example created by Michael, additions by Stefan --- examples/hello_world.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 examples/hello_world.php diff --git a/examples/hello_world.php b/examples/hello_world.php new file mode 100644 index 0000000..b996d2e --- /dev/null +++ b/examples/hello_world.php @@ -0,0 +1,15 @@ +Hello World

Your request: hest

"; +// return "HTTP/1.1 200 OK\r\nConnection: Keep-Alive\r\nContent-Type: text/html\r\nDate: Sat, 26 Apr 2008 01:13:35 GMT\r\nServer: mistral/0.1\r\n\r\nHello World

Your request: hest

"; +} + +# Bind Webserver on all ips with port 8802, timeout > 0 == keep-alive +mistral_init('0.0.0.0', 6901, 0); + +# Setup callback function which gets called after each client request +mistral_register_callback("my_cool_callback"); + +# Start serving +mistral_start(); +?> -- 2.11.4.GIT