- dumb async http server
- dumb forking http server
- dumb forking https server
- dumb http server
- dumb jsonrpc server
- dumb smtp server
- dumb soap server
- dumb syslog server
- dumb xmlrpc server
- fork with shared
- get http head
- ipc queues
- nshttpd
- persistent forking xmlrpc server
- shared obj
- simple chat server
- time server
- timer test
Click on the filename to view the highlighted source code.
dumb_syslog_server.php
<?php
require "nanoserv/handlers/Syslog/Server.php";
class dumb_syslogger extends \Nanoserv\Syslog\Server {
public function on_Event($host, $facility, $severity, $message) {
echo "--- Syslog event --------------------------------------------------------------\n";
echo "Datetime : ".date("Y-m-d H:i:s")."\n";
echo "Host : {$host}\n";
echo "Facility : ".self::Code_To_Facility($facility)."\n";
echo "Severity : {$severity}\n";
echo "Message : ".trim($message)."\n";
}
}
\Nanoserv\Core::New_Listener("udp://0.0.0.0:514", "dumb_syslogger")->Activate();
\Nanoserv\Core::Run();
?>