PInetd: Portable INET Daemon
Mark Karpeles has in fact, written a fully functional DNS daemon in PHP. Goes to prove that you can do anything in PHP. He actually had some solid reasons for doing it as well.
This DNS daemon uses PInetd, which is licensed under GPL 2:
PInetd [1] (Portable INET Daemon) is an Open Source server framework & daemon written in PHP, allowing anyone to easily create a TCP server, daemon, etc.
You can either use it as a developper, and build your own application.
I am planing to build a prototype of a DNSBL. Maybe PInetd is an option for this. We will see, but more about that later.
There is a *reason* why _not_ “anyone” should be allowed to write networked
programmes “easily”. Especially… PHP. Ugh. Now c’mon, really. Such frameworks
ought to be forbidden. Or at least not advertised.
@mirabilos
“not allowed anyone write network programs easily” makes me ROFL.
It is their problem what they use and whatfor. You can write buggy software in any language, and if they like writing crappy software?! So what?!
But I would not write any productive daemon in PHP either if I have an option. But I also do not want to write any missing feature into the bind source, so sometimes in some cases this PHP daemon is not the worst option.
But you are free NOT to use this
so please ignore my blog post.
If you really wonder if it’s that bad, you can have a look at my article about performances of this DNS Daemon. I am the first surprised by the results, and will now work on some optimizations.
http://blog.magicaltux.net/2009/02/18/php-dns-daemon-performances/