source: Dev/trunk/src/client/dojox/widget/tests/honey.php

Last change on this file was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 626 bytes
Line 
1<?php
2/* honey.php - sample fake delay script to push data
3   - should use ob_flush() to send chunks rather than
4   just take a long time ...
5*/
6
7session_start();
8
9$char = " ";
10$fakeDelay = (empty($_GET['delay'])) ? 1 : $_GET['delay'];
11$dataSize = (empty($_GET['size'])) ? 2*1024 : $_GET['size'];
12if (empty($_SESSION['counter'])) $_SESSION['counter'] = 1;
13$dataSent = 0;
14$blockSize = 1024;
15
16if ($fakeDelay) { sleep($fakeDelay); }
17
18print "view num: ".$_SESSION['counter']++;
19while ($dataSent<=$dataSize) {
20        for ($i=0; $i<$blockSize/4; $i++) {
21                print $char;
22        } print "<br />";
23        $dataSent += $blockSize;
24        sleep(1);
25}
26
27?>
Note: See TracBrowser for help on using the repository browser.