File: sample8.php

Recommend this page to a friend!
  Classes of Tom Schaefer  >  Script Progress  >  sample8.php  >  Download  
File: sample8.php
Role: Example script
Content type: text/plain
Description: additional browser notifications
Class: Script Progress
Flush page output to show progress of server task
Author: By
Last change:
Date: 8 years ago
Size: 1,122 bytes
 

Contents

Class file image Download
<?php

include_once 'class.0.2.php';


/**
 * eight steps, each sleeps for 1 sec
 */
$buff = new ScriptProgress(8, 1000000);
$buff->addStylesheet();
$buff->addScript(); // embed notification script

$buff->set("<ul>");
# do some stuff here
$buff->notify("initialize"); // notification
$buff->next();


$buff->set("<li></li>");
$buff->notify("configure");
# do some stuff here
$buff->next();

$buff->set("<li></li>");
$buff->notify("prepare process");
# do some stuff here
$buff->next();

$buff->set("<li></li>");
$buff->notify("execute process");
# do some stuff here
$buff->next();

$buff->set("<li></li>");
$buff->notify("post process");
# do some stuff here
$buff->next();

$buff->set("<li></li>");
$buff->notify("send messages");
# do some stuff here
$buff->next();

$buff->set("<li></li>");
$buff->notify("log protocol");
# do some stuff here
$buff->next();

$buff->set("<li></li>");
$buff->notify("render application");
# do some stuff here
$buff->next();


# end operation
$buff->set("</ul>");
$buff->notify("done");

# do some stuff here
$buff->next();


For more information send a message to info at phpclasses dot org.