src/whatsprot.class.php
public function sendPing()
    {
        $msgId = $this->createIqId();
        $pingNode = new ProtocolNode('ping', null, null, null);
        $node = new ProtocolNode('iq',
            [
                'id'    => $msgId,
                'xmlns' => 'w:p',
                'type'  => 'get',
                'to'    => Constants::WHATSAPP_SERVER,
            ], [$pingNode], null);

        $this->sendNode($node);
    }
public function sendPing()
    {
        $msgId = $this->createIqId();
        $pingNode = new ProtocolNode('ping', null, null, null);
        $node = new ProtocolNode('iq',
            [
                'id'    => $msgId,
                'xmlns' => 'w:p',
                'type'  => 'get',
                'to'    => Constants::WHATSAPP_SERVER,
            ], [$pingNode], null);

        $this->sendNode($node);
    }
public function sendPing ( ) { $ msgId = $ this -> createIqId ( ) ; $ pingNode = new ProtocolNode ( 'ping' , null , null , null ) ; $ node = new ProtocolNode ( 'iq' , [ 'id' => $ msgId , 'xmlns' => 'w:p' , 'type' => 'get' , 'to' => Constants :: WHATSAPP_SERVER , ] , [ $ pingNode ] , null ) ; $ this -> sendNode ( $ node ) ; }
Send a ping to the server.
Send a ping to the server .