PHP code example of oseias-isidoro / evoluiton-sdk
1. Go to this page and download the library: Download oseias-isidoro/evoluiton-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
oseias-isidoro / evoluiton-sdk example snippets
use EvolutionSDK\Messages\MessageBuilder;
use EvolutionSDK\Messages\Messenger;
$builder = new MessageBuilder();
$message = $builder
->from('[instance]')
->to('[remoteJid]')
->text('simple text')
->getMessage();
if ((new Messenger())->send($message)) {
echo "success";
} else {
echo "error";
}
media(string $url, string $mediaType, string $fileName = null);
$builder->media(
'https://path_to_file',
'document', // document, image, video
'file_name' // Optional, just for document media type
);