开发者

How to implement facebook like notification on cakephp?

开发者 https://www.devze.com 2023-04-11 20:42 出处:网络
does somebody knows how to implement facebook like notification? the id开发者_StackOverflowea is to put notification on the tabs parallel to the changes made in the database without refreshing the sit

does somebody knows how to implement facebook like notification? the id开发者_StackOverflowea is to put notification on the tabs parallel to the changes made in the database without refreshing the site? if a data is added to the database, the site should react on it. thank you.. cheers!


Facebook style notifications are achieved in web applications using realtime web technologies such as Comet servers or WebSocket servers. It is possible to add this functionality directly into a PHP application but it's widely agreed that PHP doesn't handle persistent/long-held connections very well (it won't scale). If you still want to host your own realtime PHP solution here are a few resources:

  • StackOverflow question about AJAX PHP Push
  • phpwebsocket
  • Start using HTML5 WebSockets today
  • php-websocket
  • How to implement Comet in PHP

However, I'd recommend you look at a hosted solution (I work for one such company) which means all you need to do is make a HTTP call to a RESTful API and embed a JavaScript library within your application to achieve your push notifications. More information why I recommend using a hosted service in this SO question on Apache and Comet

0

精彩评论

暂无评论...
验证码 换一张
取 消