handsomegyr/wechat

A simple PHP client library for weixin

2.1.1 2023-12-15 07:33 UTC

This package is auto-updated.

Last update: 2024-11-29 05:03:21 UTC


README

#微信公众平台开发模式通用接口API新版

MIT Build Status Coverage Packagist

Requirement

  1. PHP >= 5.5
  2. Composer

Installation

$ composer require "handsomegyr/wechat" -vvv

Usage

基本使用(以服务端为例):

<?php
$client = new \Weixin\Client();
$client->setAccessToken($access_token);

echo "<br/>将一条长链接转成短链接接口<br/>";
$long_url = 'http://www.baidu.com/?a=1&b=2&c=3';
$ret = $client->getShortUrlManager()->long2short($long_url);
print_r($ret);

Documentation

License

MIT