实时实时通知Jquery PHP

编程入门 行业动态 更新时间:2024-10-25 04:25:48
本文介绍了实时实时通知Jquery PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我试图实现一个实时通知,就像facebook newsticker和通知(在顶部)一样.我想知道将其归档的最佳解决方案是什么.我实现了一个聊天应用程序,在此之前我在一定时间内触发了AJAX GET请求以实时归档,但这似乎并不好.我使用Firebug检查了Facebook,没有触发GET请求(或者它被隐藏了?)

I'm tried to implementing a live notification which is like the facebook newsticker and the notifications(on top). I was wondering what's the good solution to archieve this. I implemented an chat application before which I fired AJAX GET request in certain time to archieve the realtime, but it seems not good. I checked facebook using firebug, there is no GET request fired(or it is hided?)

现在这是我的场景:

在main.php中 我有一个实时报价器和一个通知按钮.

In main.php I have a live ticker and a notifications button.

在bulletion.php和User.php中 当我执行添加用户时,它将转到公告或user.php.

In bulletion.php and User.php When I perform an add user,it will go heading to the bulletin or user.php.

当在数据库中成功创建bulletin.php,user.php时,如何在main.php中得到通知?

How can I get informed in main.php when bulletin.php,user.php successfully created in database?

在我问之前,我也检查了这个问题. PHP/jQuery中的通知系统 实时和php吗?

I checked this question as well before I asked. notification system in PHP/jQuery Realtime and php?

我很纳闷,什么是长时间的Ajax和基于会话的通知.如何归档?我知道Node.js可以很好地实现实时性,它可以与PHP结合吗?和memcached吗?

I was wonder,what's is long poling Ajax and session-based notification.How it can be archieved? I know Node.js can be good in implementing realtime, can it combine with PHP? and memcached ?

任何人都可以提供参考资料,或者举个例子可能很好.谢谢.

Any can provide sources to refer or example might be good.Thank you.

推荐答案

作为附带说明,PHP并不是真正用于推送通知的最佳语言,它实际上是基于典型的get/response类流构建的.

As a side note, PHP isn't really the best language to use when it comes to push notifications, it's really built around typical get/response kinda flows.

我在所有页面内容中都使用PHP,但是当涉及推送通知时,我真的很喜欢 www.nodejs. org/和 socket.io/一起使用.它们非常容易设置,并且可以在大多数工作中使用php与您一起很好地工作,然后使用node处理推送通知还可以.

I use PHP for all my page stuff, but when it comes to push notifications of any sort I really like www.nodejs/ and socket.io/ to go with it. They're very easy to get setup, and will play well with you using php for the majority of your work, then using node to deal with push notification kinda stuff.

更多推荐

实时实时通知Jquery PHP

本文发布于:2023-11-16 23:09:43,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1607877.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:实时   通知   PHP   Jquery

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!