Login   Register  
PHP Classes
elePHPant
Icontem

HV HTTP Multipart: Push multiple pages to browser in one HTTP request

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author Author  
Picture of Herman Veluwenkamp
Name: Herman Veluwenkamp <contact>
Classes: 11 packages by
Country: New Zealand New Zealand
Age: ???
All time rank: 221 in New Zealand New Zealand
Week rank: 269 Down2 in New Zealand New Zealand Down
Innovation award
Innovation award
Nominee: 1x


  Detailed description   Download Download .zip .tar.gz   Install with Composer Install with Composer  
This class is meant to compose and serve multiple pages that replace each other in a single HTTP request.

It uses the MIME content type multipart/x-mixed-replace content type to keep the connection open. Only works in browsers that support that content type, obviously. This does not include MS Explorer.

It can send multiple pages that replace each other even with different content types. It can iterate over a set of pages that are deliver one after the other waiting a given interval period.

It can be used to show the progress of lengthy tasks or exhibit animations and slideshows.

  Classes of Herman Veluwenkamp  >  HV HTTP Multipart  >  Download Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: HV HTTP Multipart
Base name: hv_httpmultipart
Description: Push multiple pages to browser in one HTTP request
Version: 1.0.0
PHP version: -
License: GNU General Public License (GPL)
All time users: 1756 users
All time rank: 2060
Week users: 0 users
Week rank: 1518 Equal
 
  Groups   Rate classes User ratings   Applications   Files Files  

  Groups  
Group folder image HTTP HTTP protocol clients, headers and cookies View top rated classes
Group folder image Video Movies and video data generation and manipulation View top rated classes


  Innovation Award  
PHP Programming Innovation award nominee
June 2004
Number 7


Prize: One book of choice by O'Reilly
The HTTP protocol can be used to serve content in ways that are not very well known. One of such ways is to use MIME multipart content types.

The multipart/x-mixed-replace content type allows to serve a sequence of distinct content objects that replace each other within the same HTTP request. This means that the same page can display different content parts that appear successively.

Since each part may be served with wait intervals that are defined by the script that serves the page, this can be used for pushing new content once it is made available on the server, thus without having the user or the browse to issue a new request.

Despite it is a feature that is not supported by all browsers, it can be used for event driven applications that depend on events that may occur on the server side besides others that occur on the client side.

This class provides a solution for creating these multipart replacement content type parts without having to understand too much about the technical details of the protocol.

It comes with illustrating examples that show how to generate server based animations or replace content after a given period of time producing interesting slideshow effects.

Manuel Lemos

  User ratings  
RatingsUtility Consistency Documentation Examples Tests Videos Overall Rank
All time: Good (83%) Good (83%) - Sufficient (75%) - - Not sure (57%) 1069
Month: Not yet rated by the users

  Applications that use this package  
No pages of applications that use this class were specified.
Add link image If you know an application of this package, send a message to the author to add a link here.
  Files folder image Files  
File Role Description
Accessible without login Plain text file demo_iteration.php Example Demo 3 - poor man's animation
Accessible without login Plain text file demo_processing.php Example Demo 1 - for pages that take a long time to process.
Accessible without login Plain text file demo_xul.php Example Demo 2 - two pages with different content types
Plain text file HV_HttpMultipart.php Class Main class
Accessible without login HTML file page_1.html Data Page 1 for iteration
Accessible without login HTML file page_2.html Data Page 2 for iteration
Accessible without login HTML file page_3.html Data Page 3 for iteration
Accessible without login HTML file page_4.html Data Page 4 for iteration
Accessible without login HTML file page_5.html Data Page 5 for iteration
Accessible without login HTML file page_6.html Data Page 6 for iteration
Accessible without login HTML file page_7.html Data Page 7 for iteration
Accessible without login Plain text file page_finished.xul Data Page that displays 'Finished' in XUL markup
Accessible without login HTML file page_ok.html Data Page that displays 'OK'
Accessible without login HTML file page_processing.html Data Page that displays 'Processing'

Install with Composer Install with Composer - Download Download all files: hv_httpmultipart.tar.gz hv_httpmultipart.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.