Example #1
0
<?php

$config['webpassword'] = '******';
$config['254707820997'] = array('fromNumber' => '254707820997', 'nick' => "cfmsaf", 'waPassword' => "Mny0EPWPZmHmlVNkWTdiQ+5sIaI=", 'id' => "%ec%5d%23%24xa%00%5d%dd%7d%5b%0b%bf%3c%9b%9f%3c%89x%0e");
require 'src/whatsprot.class.php';
$whatsapp = new Whatsapp($config);
$whatsapp->updateStatus();
class Whatsapp
{
    private $config;
    private $from;
    private $number;
    private $id;
    private $nick;
    private $password;
    private $contacts = array();
    private $inputs;
    private $messages;
    private $wa;
    private $connected;
    private $waGroupList;
    public function __construct(array $config)
    {
        $this->config = $config;
        try {
            $this->number = "254707820997";
            $this->id = "%ec%5d%23%24xa%00%5d%dd%7d%5b%0b%bf%3c%9b%9f%3c%89x%0e";
            $this->nick = "Nyandarua";
            $this->password = "******";
            $this->wa = new WhatsProt($this->number, $this->id, $this->nick, true);
            $this->wa->eventManager()->bind('onConnect', array($this, 'connected'));