<?php
require './vendor/autoload.php';

use GreenApi\RestApi\GreenApiClient;


//The idInstance and apiTokenInstance values are available in your account, double brackets must be removed
$url = 'https://7105.api.greenapi.com/waInstance7105227625/sendMessage/ef03df146215403e913a7907fadb72c67c7862fde7a24273a4';

//chatId is the number to send the message to (@c.us for private chats, @g.us for group chats)
$data = array(
'chatId' => '989140790345@c.us', 
'message' => 'امروز نوبت شماست'
);

$options = array(
    'http' => array(
        'header' => "Content-Type: application/json\r\n",
        'method' => 'POST',
        'content' => json_encode($data)
    )
);

$context = stream_context_create($options);

$response = file_get_contents($url, false, $context);

echo $response;
?>