Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

9. Hacking HTML5 Connectivity > Hack 72. Build a Donation Thermometer with Web ...

Hack 72. Build a Donation Thermometer with Web Sockets, the Pusher API, and PHP

Donation thermometers are used at a lot of charity events and donation sites, but they tend to only update when you refresh the page. It’s now easier than ever to make these thermometers update in real time, the instant somebody makes a donation, by using HTML5 Web Sockets.

This hack was contributed by Phil Leggetter, a Real-Time Web Software and Technology Evangelist.

A number of real-time services and solutions are available today. For the donation thermometer we’ll use Pusher, which uses HTML5 Web Sockets, to add real-time functionality to the widget. This real-time functionality will not only ensure that the donation value is instantly correct, but will also add a level of excitement which can result in a “stickiness” that keeps the user’s attention.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint