$aParams['msg_function']: your message process function, if empty, msnbot will ignore any message. like: processMsg($from, $msg, $network = 1) default: false $aParams['add_user_function']: your function when someone add us to his contact list. like: addContact($from, $network = 1) default: false $aParams['remove_user_function']: your function when someone remove us from his contact list. like removeContact($from, $network = 1) default: false $aParams['use_ping']: if true, msnbot will send PNG to server (0-50 seconds) to keep alive, but... even without this, we're still online. if this variable is a non-zero integer, will send PNG command every $use_ping seconds. default: false $aParams['retry_wait']: if we lost connection, how long we should wait before we try again. default: 30 $aParams['backup_file']: move .msn file to backup folder after processed default: true $aParams['update_pending']: try to add pending list member to avail/reverse list, and delete it from pending list default: true */ $msn->doLoop(array('user' => $msn_acct, 'password' => $msn_password, 'alias' => $msn_alias, 'psm' => $msn_psm, 'msg_function' => 'processMsg', 'add_user_function' => 'addContact', 'remove_user_function' => 'removeContact', 'use_ping' => 600)); $msn->log_message("done!"); @unlink(dirname($_SERVER['argv'][0]) . DIRECTORY_SEPARATOR . 'log' . DIRECTORY_SEPARATOR . 'msnbot.pid'); exit; function getpid() { global $windows; if ($windows) { return 'nopid'; } return posix_getpid(); }