This PHP sample code allows you to track MySQL changes with WebSockets.
To find examples and guide for other languages and frameworks such as Laravel, Django, SpringBoot and Ruby on rail, please visit the related tutorial: Track MySQL Database Changes With WebSockets Using PieSocket
- Get your API key and secret from PieSocket.com
- Replace API credentials and database settings in index.php and admin.php
- Open
index.php
in a browser - Execute
admin.php
to make an entry in the MySQL tableusers
and send an update alert to the front-end i.eindex.php