php - IMAP IDLE monitoring service with http callback? -


i have small web app polls imap mailbox (via php's imap module) every minute via cronjob. i'd make more realtime, maximum 1 minute lag unacceptable in cases.

is there service out there connect imap mailbox, use imap idle monitor messages, post exhaustive message data (headers, content) url? sort of twilio incoming phone calls?

i don't know of service describe, suggest turning script have daemon.

if wanted, using pcntl extension. instead, utilize class has set , ready go:

http://kevin.vanzonneveld.net/techblog/article/create_daemons_in_php/

using class, can create "daemonized" version of script easily:

require_once "system/daemon.php";                 // include class system_daemon::setoption("appname", "mydaemon");  // minimum configuration system_daemon::start();                           // spawn deamon! 

(sample code page daemon class)


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -