System_Daemon

Because the Process Control Extensions' documentation is a bit rough, I decided to figure it out once, and then wrap my knowledge and the required code inside a PEAR class called: System_Daemon. And so now you can just:

System_Daemon Usage

<?php
    
require_once "System/Daemon.php";                 // Include the Class

    
System_Daemon::setOption("appName""mydaemon");  // Minimum configuration
    
System_Daemon::start();                           // Spawn Deamon!
?>

And that's all there is to it. The code after that, will run in your server's background. So next, if you create a while(true) loop around that code, the code will run indefinitely. Remember to build in a sleep(5) to ease up on system resources.

Features & Characteristics Here's a grab of System_Daemon's features:

レンタルサーバー