php idle,支持PHP中的IMAP IDLE

I have read through all PHP documentation on IMAP functions (www.php.net/imap), but didn't find anything on issueing an IDLE command over an IMAP connection.

我已閱讀有關IMAP函數(www.php.net/imap)的所有PHP文檔,但未發現有關通過IMAP連接發出IDLE命令的任何內容。

I want to establish an IMAP connection between my server and GMail, and be notified instantly that a new message has arrived. It's kind of GMail PUSH to my server. The way mobile devices are doing it is by connecting through IMAP and sending the IDLE command.

我想在我的服務器和GMail之間建立IMAP連接,並立即通知新消息已到達。這是我服務器的GMail PUSH。移動設備的方式是通過IMAP連接並發送IDLE命令。

But didn't find a word on IDLE in PHP-IMAP. Is it supported?

但是在PHP-IMAP中沒有找到關於IDLE的詞。是否支持?

2 个解决方案

#1

I've been working on modifying the ilohamail.org imap client to support the IDLE extension. My application however will be running with php cli and not through a web server. I can post the code when / if I have a working version.

我一直在努力修改ilohamail.org imap客戶端以支持IDLE擴展。然而,我的應用程序將使用php cli而不是通過Web服務器運行。如果我有工作版本,我可以發布代碼。

You may want to use the http://roundcube.net imap library which is just modified from the ilohamail library.

您可能想要使用剛剛從ilohamail庫修改的http://roundcube.net imap庫。

#2

IDLE isn't supported by PHP's IMAP functions.

PHP的IMAP功能不支持IDLE。

The documentation suggests using imap_ping for a periodic "new mail check"

文檔建議使用imap_ping進行定期“新郵件檢查”

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值