/php-sse

Small HTML5 SSE library using PHP and Javascript

Primary LanguagePHPMIT LicenseMIT

PHP-SSE

Small HTML5 SSE library using PHP and Javascript.

Instructions

You just have a couple of things to setup the library in your project.

  1. Define command line in file sse.task.php.
  2. Include the SSE variant you need in your front-end file.
  3. Include the SSE client Javascript code in your front-end file.
  4. Enjoy! 😁

Variants

There is two variants of the project.

  1. One that output JSON formatted data.
  2. One that output RAW data.

Bonus

The output will get scrolled automatically!

Demo

You can see the result for this run, when I'm exporting a database using pg_dump.

demo

Inspiration

I took the idea from this website: http://qnimate.com/implementing-push-technology-in-web-sites/.

Contribute

Feel free to contribute to this project by openning issues and pull requests.

Contact

You can reach me on Twitter by using @Jiab77.