PHP code example of jiankechu / push-robot

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

    

jiankechu / push-robot example snippets


    //推送异常消息示例
  $config = [
            'wx_work' => [
                'key' => '企业微信群机器人key'
            ]
        ];
        $msg    = new \ZJKe\PushRobot\WxWork\MsgTplExceptionMarkdown(new Exception('test'));
        $msg->setEnv('test')->setParam(['a' => 'a'])->setUrl('/test');
        $robot = (new \ZJKe\PushRobot\WxWork\Robot($config, $msg));
        $robot->push();