PHP code example of lsshu / wechat

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

    

lsshu / wechat example snippets


$config = ['appId'=>'','appSecret'=>''] ;
$account = Lsshu\Wechat\Service::account($config);

$config = ['appId'=>'','token'=>'','encodingAesKey'=>''] ;
$message = Lsshu\Wechat\Service::message($config);

$config = ['appId'=>'','appSecret'=>''] ;
$program = Lsshu\Wechat\Service::program($config);

$res = $program->code2Session($code);

$res = $program->createWXAQRCode($path, $width);

$res = $program->getWXACode($path, $width, $auto_color, $line_color, $is_hyaline);

$res = $program->getWXACodeUnlimit($scene, $page, $width, $auto_color, $line_color, $is_hyaline);