Skip to content

How To: Drive Smashing widgets with PHP

Toby Creek edited this page Sep 4, 2019 · 7 revisions

To leverage an existing code base or separate the dashboard from the data source using only an HTTP connection, it may be desirable to POST data to the widgets easily using PHP.

Create a function library to allow POSTing data to the dashing widget

This GIST has a function library and an example job

Edit the function library to insert the Smashing widget URL and the auth token.

Use PHP's json_encode function to turn an array or object into a JSON string.

Use the function library's send_event() function to POST data.

Clone this wiki locally