當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WhatsProt::disconnect方法代碼示例

本文整理匯總了PHP中WhatsProt::disconnect方法的典型用法代碼示例。如果您正苦於以下問題:PHP WhatsProt::disconnect方法的具體用法?PHP WhatsProt::disconnect怎麽用?PHP WhatsProt::disconnect使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WhatsProt的用法示例。


在下文中一共展示了WhatsProt::disconnect方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: onSyncResult

        $w->sendMessage($msg['Dest_CtyCode'] . $msg['Dest_Number'], $msg['Dest_Message']);
        mysql_query("INSERT INTO `OutMessageCompleted` (Job_ID, Job_Time, Job_Type, Dest_CtyCode, Dest_Number, Dest_Message) VALUES (NULL, NULL, 'WA', '" . $msg['Dest_CtyCode'] . "', '" . $msg['Dest_Number'] . "', '" . $msg['Dest_Message'] . "')");
        mysql_query("DELETE FROM `OutMessageQueue` WHERE Job_ID='" . $msg['Job_ID'] . "'");
    }
    /******
    				mysql_query("INSERT INTO `messages` VALUES (NULL, NOW(), 'WA-API', '$dnum', '$dmsg')");
    				$gc = getGroupChats();
    				while ($row = mysql_fetch_array($gc)) {
    					$dnum=$row['group_code'];
    					echo 'Send to: '.$dnum . '#'. $dmsg."\n";
    					mysql_query("INSERT INTO `messages` VALUES (NULL, NOW(), 'WA-API', '".$row['group_names']."', '$dmsg')");
    					$w->sendMessage($dnum, $dmsg);
    	*********/
}
//for loop
$w->disconnect();
echo "Disconnected. Bye! :D\n";
die;
function onSyncResult($result)
{
    foreach ($result->existing as $number) {
        global $existUser;
        $existUser = true;
    }
}
function onGetGroupV2Info($mynumber, $group_id, $creator, $creation, $subject, $participants, $admins, $fromGetGroup)
{
    $select = "SELECT group_names FROM `WAGroupChats` WHERE group_code='{$group_id}'";
    $row = mysql_fetch_array(mysql_query($select));
    if ($row) {
        mysql_query("UPDATE WAGroupChats SET group_names='{$subject}' WHERE group_code='{$group_id}'");
開發者ID:jeromez80,項目名稱:dutyPhone,代碼行數:31,代碼來源:pollMessage.php

示例2: __destruct

 /**
  * Cleanly disconnect from Whatsapp.
  *
  * Ensure at end of script, if a connected had been made
  * to the whatsapp servers, that it is nicely terminated.
  *
  * @return void
  */
 public function __destruct()
 {
     if (isset($this->wa) && $this->connected) {
         $this->wa->disconnect();
     }
 }
開發者ID:djade007,項目名稱:WhatsApp,代碼行數:14,代碼來源:WhatsAppApi.php


注:本文中的WhatsProt::disconnect方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。