Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header("Content-Type: text/event-stream\n\n");
- echo 'data: ' . json_encode(
- array(
- 0 => array(
- 'time' => time(),
- 'message' => 'Some kind of foo'
- ),
- 1 => array(
- 'time' => time(),
- 'message' => 'Some kind of quux'
- )
- )
- ) . "\n";
- ?>
Add Comment
Please, Sign In to add comment