I'm trying to use Whatsapi for PHP but it's not working while I call the loginWithPassword function. My code:
<?php
require_once __DIR__.'/src/whatsprot.class.php';
require_once __DIR__.'/src/events/MyEvents.php';
$username = 'Number';
$password = 'Password';
$nickname = 'Nick';
$target = "targetNumber";
$debug = true;
$w = new WhatsProt($username, $nickname, $debug);
$events = new MyEvents($w);
$events->setEventsToListenFor($events->activeEvents);
$w->connect();
$w->loginWithPassword($password);
$w->sendMessage($target, 'Guess the number :)');
$w->sendMessage($target, 'Sent from RopajiBotServices at '.date('H:i'));
?>
This is the message I receive:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Thanks