Download the PHP package maniac/easemob-php without Composer

On this page you can find all versions of the php package maniac/easemob-php. 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 easemob-php

PHP SDK

介绍

PHP SDK 是对环信 IM 服务端 API 的封装,这样做是为了节省服务器端开发者对接环信 API 的时间,只需要配置自己的 appkey 相关信息即可使用。

功能

PHP SDK 提供了用户、消息、群组、聊天室等资源的操作管理能力。

依赖

安装

直接使用 composer 进行安装

目录结构

准备

在使用 PHP SDK 之前,需要准备环信 appkey、Client ID、ClientSecret。

如果你有环信管理后台账号并创建过应用,请先登录环信管理后台,点击 这里,然后到“应用列表” → 点击“查看”即可获取到 appkey、Client ID、ClientSecret。

如果你没有环信管理后台账号,请先注册账号,点击 这里,注册成功后请登录,然后点击“添加应用”,添加成功后点击“查看”即可获取到 appkey、Client ID、ClientSecret。

使用

如果使用 Laravel、YII、ThinkPHP 之类的框架,composer 安装的库会自动加载,如果没有使用框架,需要手动引入 vendor/autoload.php 文件。

使用所有的类之前,都要先初始化授权对象,然后再初始化其他类时,传入授权对象

根据业务资源,API 分为:

每个业务资源对应一个方法,例如,用户相关的 API,都可以在 User 类中找到。

举个例子,我们要注册一个用户,就可以这样写:

参考

常见问题

1.关于 PHP 低版本中文乱码问题

在纯 PHP 页面中使用

在 HTML 和 PHP 混编的页面中使用

2.关于 SDK 返回的错误码和错误描述

PHP SDK 会直接返回 REST API 的错误码及错误描述,具体请参考 服务器端 REST API 常见错误码

3.使用代理的情况

在初始化授权对象 Auth 之后,可以设置代理:


All versions of easemob-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
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 maniac/easemob-php contains the following files

Loading the files please wait ....