HTML and CSS Reference
In-Depth Information
pusher recommends that you send JsON as the event data and their libraries help you do this. For test
purposes, and so that alert shows some human readable information, we'll just send text.
Note
upon pressing the send event button, you should receive an alert from your test script (two, if you still have the
pusher page open) that looks something like the one in Figure 3-4 .
Figure 3-4. Upon sending a test event from the Event Creator, an alert box appears
In its simplest form, this is a working pusher application. In the next exercise, you'll look at a more useful
example.
Using Pusher to Send Events
Exercise 3-1 demonstrates how easy it is to receive events with Pusher, but what about sending them?
Thanks to its variety of API libraries, Pusher makes sending events just as easy as receiving them. We'll be using
the PHP API library, which lives on GitHub at https://github.com/pusher/pusher-php-server .
 
 
Search WWH ::




Custom Search