keeping xmphp bot always online

Posted by Gunjan on Stack Overflow See other posts from Stack Overflow or by Gunjan
Published on 2010-05-11T13:17:36Z Indexed on 2010/05/11 13:34 UTC
Read the original article Hit count: 334

Filed under:
|
|
|

I created a simple xmpp bot in PHP which connects to google talk server. I basically modified the cli_longrun example. When I run the script in browser the bot comes online and stays online for a while even after I close the tab on which the script was running (as it is just an infinite loop listening for events on the stream). But after a while the bot becomes offline.

The question is how do I keep the bot always online. One way I can think of is to run a cron that would disconnect the earlier one and start a new session. But is there a better approch?

© Stack Overflow or respective owner

Related posts about xmpp

Related posts about php