PHP code example of jumoshen / ding-bot

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

    

jumoshen / ding-bot example snippets



use DingBot\Services\DingBotService;
use Psr\Http\Message\MessageInterface;

#text文本
(new DingBotService('your access_token'))->text('这是个测试', [], function(MessageInterface $result){
    # do your callback
});

#markdown
(new DingBotService(''))->markdown('- title', [], function(MessageInterface $result){
    # do your callback
});