PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Richard Keizer   100% PHP Uploader   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: server example
Class: 100% PHP Uploader
Track the progress of file upload with Web sockets
Author: By
Last change:
Date: 12 years ago
Size: 1,673 bytes
 

Contents

Class file image Download
<?php
 
 
/**------------------------------------------------------------------------------
   * Title:
   * Filename:
   * Version:
   * Author: Richard Keizer
   * Email: ra dot keizer at gmail dot com
   *-------------------------------------------------------------------------------
   * COPYRIGHT (c) 2011 Richard Keizer
   *
   * The source code included in this package is free software; you can
   * redistribute it and/or modify it under the terms of the GNU General Public
   * License as published by the Free Software Foundation. This license can be
   * read at:
   *
   * http://www.opensource.org/licenses/gpl-license.php
   *
   * This program is distributed in the hope that it will be useful, but WITHOUT
   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
   * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   *------------------------------------------------------------------------------
   *
   *
   */
 
 
error_reporting(E_ALL);
 
ini_set('display_errors', 1);
 
 
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
 
header("Cache-Control: no-cache, must-revalidate");
 
header("Pragma: no-cache");
 
  include_once
'buffer.class.php';
  include_once
'httprequestparser.class.php';
  include_once
'uploadmanager.class.php';
 
 
$_REQUEST['action'] = isset($_REQUEST['action']) ? preg_replace("/[^a-z]/", '', $_REQUEST['action']) : 'renderform';
 
$uploader = new UploadManager(5600);
  switch(
$_REQUEST['action']) {
    case
'renderform': $uploader->renderForm(); break;
    case
'startlistening': $uploader->startListening(); break;
  }