Giter VIP home page Giter VIP logo

rongcloud-sdk-php's Introduction

RongCloud PHP SDK

Latest Stable Version Total Downloads Latest Unstable Version License

融云服务端SDK,使用PHP实现。

本版本是在官方SDK版本基础上开发而成,使用Guzzle替代了cURL请求实现,集成了composer库管理。

安装

推荐使用Composer安装该SDK。关于Composer的使用,请查看该链接Composer

$ composer require leehom1988/rongcloud-sdk-php

运行上面命令,将会自动安装该SDK需要的所有依赖,注意:该SDK需要在PHP5.6.0或更新的版本上运行。

使用

<?php
require 'vendor/autoload.php';

use LeeHom\RongCloud\RongClient;
use LeeHom\RongCloud\Exception\RongCloudException;
use GuzzleHttp\Exception\GuzzleException;

$client = new RongClient('xxxxxxxxxx', 'xxxxxxxxxx');
try {
    $r = $client->User()->getToken('user_id', 'test name', 'http://www.rongcloud.cn/images/logo.png');
    echo $r;
} catch (RongCloudException $e) {
    echo $e->getMessage();
} catch (GuzzleException $e) {
    echo $e->getMessage();
}

About

If you have any question,Please be easy to contact me:

Hope it can help You,Just Enjoy It! 😁😁😁😁

License

The MIT License (MIT). Please see License File for more information.

rongcloud-sdk-php's People

Contributors

iamleehom avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.