Re: [PHP-DEV] HTTP server in PHP From: Stig S. Bakken (ssb <email protected>)
Date: 02/29/00

> Jerry wrote:
>
> Hi,
>
> I'm trying to write a HTTP server in PHP.
>
> Dose any body know how to make a comand line run script act as a damon
> and listen to a port ?
>
> I've seen it done before in PHP3 , but cant remember how ot was done.

Since you're already doing it with PHP, which is hairy, you might as
well run it from /etc/inetd.conf and use stdin and stdout. Not very
efficient, but hey... ;-)

fopen("php://stdin", "r") and fopen("php://stdout", "w") should do the
trick then.

 - Stig

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>