Login   Register  
PHP Classes
elePHPant
Icontem

File: demo_processing.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Herman Veluwenkamp  >  HV HTTP Multipart  >  demo_processing.php  >  Download  
File: demo_processing.php
Role: Example script
Content type: text/plain
Description: Demo 1 - for pages that take a long time to process.
Class: HV HTTP Multipart
Push multiple pages to browser in one HTTP request
Author: By
Last change:
Date: 2004-06-20 16:02
Size: 362 bytes
 

Contents

Class file image Download
<?php

// for pages that take a long time to process. 


include 'HV_HttpMultipart.php';
$serverpush = new HV_HttpMultipart();


$page file_get_contents('page_processing.html');
$serverpush->send($pagefalse'text/html');


sleep(2); // go and do something...


$page file_get_contents('page_ok.html');
$serverpush->send($pagefalse);
?>