2 function my_cool_callback($requests) {
3 /* Takes as argument: status_code, body, and all other headers. The above, string based still works too. */
5 return array('status_code' => '200 OK', 'connection' => 'close', 'content-type' => 'text/plain', 'body' => print_r($requests, true));
8 # Bind Webserver on all ips with port 8802, timeout > 0 == keep-alive
9 mistral_init('0.0.0.0', 6901, 0);
11 # Setup callback function which gets called after each client request
12 mistral_register_callback("my_cool_callback");