PHP code example of xsloom / xatbotstat

1. Go to this page and download the library: Download xsloom/xatbotstat 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/ */

    

xsloom / xatbotstat example snippets




use xatBotstat\Botstat;

$botStat = new Botstat('MYTOKEN', 5, 110110);
$botStat::setUserName('SLOOM');
$botStat::setUserAvatar('https://i.imgur.com/mwfzvKw.png');
$result = $botStat::sendToXat();

echo ($result['error'] ? 'An error occured: ' . $result['message'] : 'OK');