- 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_smtp_server.php
<?php
require "nanoserv/handlers/SMTP/Server.php";
class dumb_smtpd extends \Nanoserv\SMTP\Server {
function on_Mail($from, $to, $data) {
echo "mail from: $from\n";
echo "mail to : ".implode(", ", $to)."\n";
echo "\n".$data."[EOM]\n";
return false;
}
}
\Nanoserv\Core::New_Listener("tcp://0.0.0.0:250", "dumb_smtpd")->Activate();
\Nanoserv\Core::Run();
?>