Download the PHP package panthsoni/tengxun without Composer

On this page you can find all versions of the php package panthsoni/tengxun. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tengxun

tengxun

腾讯集团微信、扣扣等开发包

安装

composer require panthsoni/tengxun

使用方法

1、微信开发者模式


namespace app\example;

use panthsoni\tengxun\weixin\developer\Developer;

class Example {
    /*构造方法*/
    protect static $method = [

    ]
    protect static $developer;
    public function __construct(){
        self::$developer = Developer::init([
            'appid' => '',    //公众号appid,非必填,仅当安全模式下必填
            'encoding_aes_key' => '',  //随机密钥,非必填,仅当安全模式下必填
            'msg_signature' => '',  //消息签名,非必填,仅当安全模式下必填
        ]);
    }

    /*微信监听方法*/
    public function listen(){
        /*微信监听,setMethod为listen,当setIsSafe为true时,模式为安全模式,返回数组格式*/
        $res = self::$developer->setParams([
            'signature' => '',  //签名
            'timestamp' => 1562212362,
            'nonce' => '',  //随机字符串
            'token' => '',   //token码
            'echostr' => '',  //非必填,仅当第一次验证时传入
        ])->setMethod('listen')->setIsSafe(true)->getResult();

        return $res;
    }

    /*被动回复用户信息方法*/
    public function replyMessage(){
        /*微信监听,setMethod为replyMessage,当setIsSafe为true时,模式为安全模式,返回数组格式*/
        $res = self::$developer->setParams([
            'msg_type' => '',   //消息类型,text,voice,video,music,news,image,transfer_customer_service
            'to_user_name' => '',   //接收用户openid
            'from_user_name' => ''   //发送者
        ])->setBizParams([
            'content' => '',   //内容,仅当消息类型为text时,必填
            'media_id' => '',   //媒体ID,仅当消息类型为voice,video,music,image时,必填
            'title' => '',    //非必填,标题
            'description' => '',   //非必填,描述
            'music_url' => '',   //非必填,音乐链接
            'hq_music_url' => '',   //非必填,音乐hq链接
            'article_counts' => 1,  //文章个数,仅当消息类型为news时,必填
            'article_content' => [
                [
                    'title' => '',   //标题,仅当消息类型为news时,必填
                    'description' => '',   //描述,仅当消息类型为news时,必填
                    'pic_url' => '',   //图片链接,仅当消息类型为news时,必填
                    'url' => '',   //跳转链接,仅当消息类型为news时,必填
                ]
            ]
        ])->setMethod('replyMessage')->setIsSafe(true)->getResult();

        exit($res);
    }

    /*获取access_token*/
    public function getAccessToken(){
        $res = self::$developer->setParams([
            'secret' => ''
        ])->setMethod('get_base_access_token')->getResult();

        return $res;
    }

    /*菜单服务,相关方法有create_menu,get_menu,del_menu,create_self_menu,del_self_menu,get_self_menu*/
    public function menu(){
        $res = self::$developer->setParams([
            'access_token' => '',
            'button' => '',
            'menuid' => ''
        ])->setMethod('create_menu')->getResult();

        return $res;
    }
}

All versions of tengxun with dependencies

PHP Build Version
Package Version
Requires php Version >7.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package panthsoni/tengxun contains the following files

Loading the files please wait ....