Created
November 13, 2015 03:30
-
-
Save ShinyChang/96c836014e9de78cf518 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('Access-Control-Allow-Origin: *'); | |
header('Cache-Control: private'); | |
header('Pragma: no-cache'); | |
Header('Connection: Keep-Alive'); | |
Header('Proxy-Connection: Keep-Alive'); | |
Header('Content-Type: application/json;charset=UTF-8'); | |
// generate 2k garbage data | |
foreach (range(0, 2048) as $key => $value) { | |
echo " "; | |
} | |
while (true) { | |
echo json_encode(array( | |
'status' => true, | |
'message' => 'Hello World!!' | |
)); | |
ob_flush(); | |
flush(); | |
sleep(1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment