Skip to content

winlinvip/rtc-app-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

rtc-app-php

PHP AppServer for RTC.

You could also write AppServer by following languages:

For RTC deverloper:

Use OpenAPI to create channel:

Token generation algorithm:

Usage

  1. Generate AK from here:
AccessKeyID: OGAEkdiL62AkwSgs
AccessKeySecret: 4JaIs4SG4dLwPsQSwGAHzeOQKxO6iw
  1. Create APP from here:
AppID: iwo5l81k
  1. Clone SDK:
git clone https://github.com/winlinvip/rtc-app-php.git &&
cd rtc-app-php/app/v1 &&
git clone https://github.com/aliyun/aliyun-openapi-php-sdk.git
  1. Create DB file for php:
touch db.txt && chmod 777 db.txt
  1. Create Config.php by your data:
echo "<?php" > Config.php
echo "\$listen = 8080;" >> Config.php
echo "\$region_id = 'cn-hangzhou'; " >> Config.php
echo "\$endpoint = 'rtc.aliyuncs.com'; " >> Config.php
echo "\$access_key_id = 'OGAEkdiL62AkwSgs'; " >> Config.php
echo "\$access_key_secret = '4JaIs4SG4dLwPsQSwGAHzeOQKxO6iw'; " >> Config.php
echo "\$app_id = 'iwo5l81k'; " >> Config.php
echo "\$gslb = 'https://rgslb.rtc.aliyuncs.com'; " >> Config.php
echo "?>" >> Config.php

User can use other DB like MySQL.

  1. Verify your AppServer by here or verify token.

AppServer Success

AppServer Failed

AppServer Error Recovered

Remark: You can setup client native SDK by http://30.2.228.19:8080/app/v1.

Remark: Please use your AppServer IP instead by ifconfig eth0.

History

  • e190da2, Update SessionID generation algorithm.
  • 8663717, Support recover for some OpenAPI error.
  • 2c0fe60, Log the request id and cost in ms.
  • 42ab163, Use HTTP, x3 times faster than HTTPS.
  • 4d362dc, Set endpoint to get correct error.
  • Support create channel and sign user token.

About

PHP AppServer for RTC.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages