Simple comet example using php and jquery

前端 未结 7 1358
一个人的身影
一个人的身影 2020-12-01 02:17

Can anyone give me a good and simple example of the comet technique using PHP?

I just need an example that uses a persistent HTTP connection or something similar. I

7条回答
  •  被撕碎了的回忆
    2020-12-01 02:35

    For IIS, there's WebSync. Since you're using PHP, however, you might be better off with WebSync On-Demand. Either one will give you the server-push you're looking for, and is simple to use. Check out this question as well, which is basically what you're after.

    Here's a simple example of WebSync On-Demand in action using no scripting language. Simply open in two windows, and see the publish/subscribe in action.

    To publish from the server, you can use the PHP api.

提交回复
热议问题