src/whatsprot.class.php
public function loginWithPassword($password)
    {
        $this->password = $password;
        if (is_readable($this->challengeFilename)) {
            $challengeData = file_get_contents($this->challengeFilename);
            if ($challengeData) {
                $this->challengeData = $challengeData;
            }
        }
        $login = new Login($this, $this->password);
        $login->doLogin();
    }
public function loginWithPassword($password)
    {
        $this->password = $password;
        if (is_readable($this->challengeFilename)) {
            $challengeData = file_get_contents($this->challengeFilename);
            if ($challengeData) {
                $this->challengeData = $challengeData;
            }
        }
        $login = new Login($this, $this->password);
        $login->doLogin();
    }
public function loginWithPassword ( $ password ) { $ this -> password = $ password ; if ( is_readable ( $ this -> challengeFilename ) ) { $ challengeData = file_get_contents ( $ this -> challengeFilename ) ; if ( $ challengeData ) { $ this -> challengeData = $ challengeData ; } } $ login = new Login ( $ this , $ this -> password ) ; $ login -> doLogin ( ) ; }
Login to the WhatsApp server with your password.

If you already know your password you can log into the Whatsapp server
using this method.

@param string $password Your whatsapp password. You must already know this!
Login to the WhatsApp server with your password .