PHP Classes

File: demo_iteration.php

Recommend this page to a friend!
  Classes of Herman Veluwenkamp   HV HTTP Multipart   demo_iteration.php   Download  
File: demo_iteration.php
Role: Example script
Content type: text/plain
Description: Demo 3 - poor man's animation
Class: HV HTTP Multipart
Push multiple pages to browser in one HTTP request
Author: By
Last change: Updated script.
Date: 19 years ago
Size: 530 bytes


Class file image Download

// poor man's animation

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

$data = array();
$data[] = file_get_contents('page_1.html');
$data[] = file_get_contents('page_2.html');
$data[] = file_get_contents('page_3.html');
$data[] = file_get_contents('page_4.html');
$data[] = file_get_contents('page_5.html');
$data[] = file_get_contents('page_6.html');
$data[] = file_get_contents('page_7.html');
$data[] = file_get_contents('page_ok.html');

$serverpush->iterate($data, 1);