Login   Register  
PHP Classes
elePHPant
Icontem

File: demo_xul.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_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: 10 years ago
Size: 489 bytes
 

Contents

Class file image Download
<?php

// 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($pagefalse'text/html');


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


$page file_get_contents('page_finished.xul');
$serverpush->send($pagefalse'application/vnd.mozilla.xul+xml');

?>