PHP Classes

Simple TCP Daemon: Simple TCP Daemon

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 59%Total: 3,874 This week: 1All time: 822 This week: 560Up
Version License Categories
daemon 1.0GNU General Publi...Networking, Web services
Description 

Author

This class lets you write Simple daemons. The features of this class are:
* Support running as inetd/standalone app
* Validate commands and handle commands through callbacks

Picture of sunson
Name: sunson <contact>
Classes: 1 package by
Country: United States United States
Age: ???
All time rank: 818112 in United States United States
Week rank: 411 Up48 in United States United States Up

Details

README file for the daemon class: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I'm assuming that you have the skill to install the script and read through its sources. All that I'm going to offer here, is some little instructions on how you can use this script. This program needs a PHP interpreter compiled with the --enable-sockets option. If you needed to write an app that wants to use a simple command based protocol over the network (like FTP) you can use this daemon. The implementation part should be understandable from the test script provided herewith. To run the daemon, you need the CGI/CLI version of the php interpreter. I wrote this script on Debian GNU/Linux and am assuming that you've put your PHP binary in the place where the standard php4-cgi debian package puts it. (ie., /usr/lib/cgi-bin/php4). If the program starts up successfully, you can try telnetting to port 19123 (thats where the sample script starts listening) as following: $ telnet 127.0.0.1 19123 GNUPHPtial daemon (0.0.1b) (Debian GNU/Linux) foo> _ That is the prompt, you can type in various things there. HELP should show the list of valid commands. HaPHPy Hacking! -Suraj suraj@chennailug.org

  Files folder image Files  
File Role Description
Plain text file class.daemon.php Class Daemon Class Code
Accessible without login Plain text file daemon.php Example Script that starts a simple daemon
Accessible without login Plain text file README Doc. README file

 Version Control Unique User Downloads Download Rankings  
 0%
Total:3,874
This week:1
All time:822
This week:560Up
 User Ratings  
 
 All time
Utility:75%StarStarStarStar
Consistency:75%StarStarStarStar
Documentation:64%StarStarStarStar
Examples:85%StarStarStarStarStar
Tests:-
Videos:-
Overall:59%StarStarStar
Rank:1224