note 75751 added to wrappers

From: Date: Thu, 14 Jun 2007 11:25:27 +0000
Subject: note 75751 added to wrappers
Groups: php.notes 
Request: Send a blank email to php-notes+get-127472@lists.php.net to get a copy of this message
to create a raw tcp listener system i use the following: xinetd daemon with config like: service test { disable = no type = UNLISTED socket_type = stream protocol = tcp bind = 127.0.0.1 port = 12345 wait = no user = apache group = apache instances = 10 server = /usr/local/bin/php server_args = -n [your php file here] only_from = 127.0.0.1 #gotta love the security# log_type = FILE /var/log/phperrors.log log_on_success += DURATION } now use fgets(STDIN) to read the input. Creates connections pretty quick, works like a charm.Writing can be done using the STDOUT, or just echo. Be aware that you're completely bypassing the webserver and thus certain variables will not be available. ---- Server IP: 194.109.193.76 Probable Submitter: 213.201.208.170 ---- Manual Page -- http://www.php.net/manual/en/wrappers.php Edit -- https://master.php.net/note/edit/75751 Del: integrated -- https://master.php.net/note/delete/75751/integrated Del: useless -- https://master.php.net/note/delete/75751/useless Del: bad code -- https://master.php.net/note/delete/75751/bad+code Del: spam -- https://master.php.net/note/delete/75751/spam Del: non-english -- https://master.php.net/note/delete/75751/non-english Del: in docs -- https://master.php.net/note/delete/75751/in+docs Del: other reasons-- https://master.php.net/note/delete/75751 Reject -- https://master.php.net/note/reject/75751 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#127472) next »