Skip to content

Instantly share code, notes, and snippets.

@ready4god2513
Created March 4, 2013 18:04
Show Gist options
  • Save ready4god2513/5084166 to your computer and use it in GitHub Desktop.
Save ready4god2513/5084166 to your computer and use it in GitHub Desktop.
PUBNUB.subscribe({
channel : "/path",
message : function(message)
{
$("#current-view-count").html(message.viewerCount);
}
})
foreach($chartbeat->top as $top)
{
$pubnub->publish(array(
'channel' => $top->path,
'message' => {
viewerCount: $top->count
}
));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment