src/whatsprot.class.php
public function sendGetProfilePicture($number, $large = false)
    {
        $msgId = $this->nodeId['getprofilepic'] = $this->createIqId();

        $hash = [];
        $hash['type'] = 'image';
        if (!$large) {
            $hash['type'] = 'preview';
        }
        $picture = new ProtocolNode('picture', $hash, null, null);

        $node = new ProtocolNode('iq',
            [
                'id'    => $msgId,
                'type'  => 'get',
                'xmlns' => 'w:profile:picture',
                'to'    => $this->getJID($number),
            ], [$picture], null);

        $this->sendNode($node);
    }
public function sendGetProfilePicture($number, $large = false)
    {
        $msgId = $this->nodeId['getprofilepic'] = $this->createIqId();

        $hash = [];
        $hash['type'] = 'image';
        if (!$large) {
            $hash['type'] = 'preview';
        }
        $picture = new ProtocolNode('picture', $hash, null, null);

        $node = new ProtocolNode('iq',
            [
                'id'    => $msgId,
                'type'  => 'get',
                'xmlns' => 'w:profile:picture',
                'to'    => $this->getJID($number),
            ], [$picture], null);

        $this->sendNode($node);
    }
public function sendGetProfilePicture ( $ number , $ large = false ) { $ msgId = $ this -> nodeId [ 'getprofilepic' ] = $ this -> createIqId ( ) ; $ hash = [ ] ; $ hash [ 'type' ] = 'image' ; if ( ! $ large ) { $ hash [ 'type' ] = 'preview' ; } $ picture = new ProtocolNode ( 'picture' , $ hash , null , null ) ; $ node = new ProtocolNode ( 'iq' , [ 'id' => $ msgId , 'type' => 'get' , 'xmlns' => 'w:profile:picture' , 'to' => $ this -> getJID ( $ number ) , ] , [ $ picture ] , null ) ; $ this -> sendNode ( $ node ) ; }
Get profile picture of specified user.

@param string $number
Number or JID of user
@param bool   $large
Request large picture
Get profile picture of specified user .