当前位置: 首页>>代码示例>>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;未经允许,请勿转载。