PHP Classes

File: demo_xul.php

Recommend this page to a friend!
  Classes of Herman Veluwenkamp   HV HTTP Multipart   demo_xul.php   Download  
File: demo_xul.php
Role: Example script
Content type: text/plain
Description: Demo 2 - two pages with different content types
Class: HV HTTP Multipart
Push multiple pages to browser in one HTTP request
Author: By
Last change:
Date: 19 years ago
Size: 489 bytes


Class file image Download

// demo of two pages with different content types - one HTML, the other XUL.
// this example works in mozilla/firefox only of course.

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_finished.xul');
$serverpush->send($page, false, 'application/vnd.mozilla.xul+xml');