Location: PHPKode > scripts > Backgrounder > backgrounder/example.php
<?php
//include the class source
include("background_class_inc.php");

//instantiate a new object
$b = new background;

//check the users connection status, 
//only needs to be done once, then it becomes internal
$status = $b->isUserConn();

//keep the user connection alive, even if browser is closed!
$callback = $b->keepAlive();

//this is where you would call your code that takes a long time to execute
sleep(60); //fake the long process - a 60 second process

//fork the process, and create the child process
//call the callback function when done!
$call2 = $b->setCallback("hide@address.com","Your Script","The really long running process that you requested is complete!");

?>
Return current item: Backgrounder