PHP Classes

File: demo_processing.php

Recommend this page to a friend!
  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: 20 years ago
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($page, false, 'text/html');


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


$page = file_get_contents('page_ok.html');
$serverpush->send($page, false);
?>