如何在屏幕上隐藏Whatsapi tx和rx响应输出


How to hide Whatsapi tx and rx response output on screen

我在谷歌上搜索了很多,没有找到任何答案。。。。!

我正在使用whatsapi用PHP发送消息。

然而,当我执行包括loginwithpassword()或sendmessage()在内的任何函数时,它都会输出以tx开头的响应。我想将api集成到我的webiste中,并将某些输入自动发布到我的一些Whatsapp组中。

我使用以下代码

$username = "91xxxxxxxx"; //Mobile Phone prefixed with country code so for india it will be 91xxxxxxxx
$password = "Password";
$identity = strtolower(urlencode(sha1($username, true)));
$w = new WhatsProt($username, $identity, "WhatsApp Messaging", true); //Name your application by replacing "WhatsApp Messaging"
$w->connect();
$w->loginWithPassword($password);
$phone="91xxxxxxxxxxx";
$w->eventManager()->bind("onGetGroups", "onGetGroups");
$w->sendGetGroups();
function onGetGroups($phone,$groups)
{
echo "<form action='' method='POST'>";
foreach($groups as $gr){
    echo "<input type='checkbox' name='gids[]' value='$gr[id]'>$gr[id] ->   $gr[subject]<br>";
}
echo "<textarea name='msg' rows='10' cols='40'></textarea>";
echo "<input type='submit' name='gmsub' value='Send Group Message'>";
echo "</form>";

}
if(isset($_POST['gmsub'])){
$msg=$_POST['msg'];
$groupc=$_POST['gids'];
$total=count($groupc);
    for($i=0;$i<$total;$i++){
        $gId=$groupc[$i];
        $w->sendMessage($gId, $msg);
    }
}

我不想在我的屏幕上显示以下输出。。。

tx  <stream:features>
tx    <readreceipts></readreceipts>
tx    <groups_v2></groups_v2>
tx    <privacy></privacy>
tx    <presence></presence>
tx  </stream:features>
tx  <auth mechanism="WAUTH-2" user="91xxxxxxxxxx">&£ºƒ91xxxxxxxxxn•Vv^¹ðÁ2EÎòƒ³oΡ1447256662</auth>
rx  <start from="s.whatsapp.net"></start>
rx  <stream:features></stream:features>
rx  <challenge>œÇÚ‰C¹WŒ™`¼%1Á™</challenge>
tx  <response>ó gÏD’—!°¶µpOðµ³ @³XH2înÆ/•[r</response>
rx  <success t="1447256780" props="4" kind="free" status="active" creation="1413023053" expiration="1476095053">9Ož¦n»ÃFáG¨È{'sÊM‚</success>
.................etc 

我只想在屏幕上输出我想要的内容。如何抑制屏幕上的tx和rx输出?!

通过更改第一行false中的最后一个参数而不是true 来关闭调试模式