RTX的api開發實例,rtx開發實
RTX的api開發實例
最近接觸了RTX的接口開發部份,RTX其实有很多玩法,除了可以用自帶的客戶端發消息之外還可以用PHP調用API的方式來做一些事情,下邊整理了一下分享給大家
值得提醒的是这些接口都需要设置访问权限不然访问时会提醒“IP受限制”
RTX Server强加了SDK访问安性,因此通过http方式访问cgi文件需要在SDKProperty.xml添加远程访问机器的IP地址,如下图所示,允许192.168.10.100通过http方式访问cgi文件
以下为所有接口的清单,你也可以访问这个地方来查看相关的API http://rtx.tencent.com/sdk/
GetImage.cgi
获取指定用户的状态图片
仅支持GET传值
@param string receiver RTX用户名
@return 用户状态图片
@example http://localhost:8012/GetImage.cgi?receiver=XXXX
GetMobile.cgi
获取指定用户的手机号码
支持GET与POST传值
@param string receiver RTX用户名
@return 用户手机
@example http://localhost:8012/GetMobile.cgi?receiver=XXXX
GetSession.cgi
获取指定用户的RTX session
支持GET与POST传值
@param string receiver RTX用户名
@return RTX用户session
@example http://localhost:8012/GetSession.cgi?receiver=XXXX
Login.php
判断指定用户ID与密码是否存在RTXserver中
仅支持GET
@param string user RTX用户名
@param string pwd RTX密码
@return string 正确输出true 用户或密码错误输出false 参数缺失输出params is null
@example http://localhost:8012/Login.php?user=XXXX&pwd=XXXX
SendIM.cgi
发送IM信息
支持GET与POST传值 参数顺序随意
@param string sender 发消息人RTXid
@param string pwd 发送消息人RTX密码
@param string receivers 接收人(多个接收人之间使用,隔开)
@param string msg 消息内容
@param string sessionid RTX session
@return string
@example http://localhost:8012/SendIM.cgi?sender=XXXX&pwd=XXX&receivers=A;B&msg=CS么&sessionid=XXXX
SendNotify.cgi
发送通知信息
支持GET与POST传值 参数顺序随意
@param string title 通知标题
@param string msg 通知内容
@param string receiver 接收人(多个接收人之间使用,隔开,若为空表示广播)[option]
@param int delaytime 消息提醒框的停留时间(毫秒),0表示不自动消失
@param string okurl 成功后IE自动定位到指定的url 格式类似为:okurl=rtx.tencent.com 或者okurl=http://tx.tencent.com 注意:这里的url必须为绝对地址[option]
@param string errurl 失败后IE自动定位到指定的url[option]
@example http://localhost:8012/SendNotify.cgi?title=XXXX&msg=吃饭了&receiver=A;B&delaytime=2000
SendSMS.cgi
发送短信信息
支持GET与POST传值 参数顺序随意
@param string msg 短信内容
@param string receiver 接收人(多个接收人之间使用,隔开)
@param string sender 发送人
@param string okurl 成功后IE自动定位到指定的url 格式类似为:okurl=rtx.tencent.com 或者okurl=http://tx.tencent.com 注意:这里的url必须为绝对地址[option]
@param string errurl 失败后IE自动定位到指定的url[option]
@example http://localhost:8012/SendNotify.cgi?title=XXXX&msg=吃饭了&receiver=A;B&delaytime=2000
SignAuth.cgi
验证签名 仅支持GET 参数顺序随意
@param string user RTX用户ID
@param string sign 签名
@return string 成功为success! 失败为failed!
@example http://localhost:8012/SignAuth.cgi?user=XXXX&sign=XXXX
getstatus.php
获取用户在线状态仅支持GET
@param string username RTX用户名
@return int 0不在线 1在线
@example http://localhost:8012/getstatus.php?username=XXXX
userlist.php
获取所有用户列表(只含id与name)
@return string 用户列表(json)
@example http://localhost:8012/userlist.php
RTX API接口适合于Windows平台上支持COM标准的任何开发语言和平台(VB、VC++、ASP、JAVA、C#、PB、Delphi、LotusScript等)。
参考资料:rtx.qq.com/...ok.CHM
rtx客户端接收吗?

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Dreamweaver CS6
Visual web development tools

WebStorm Mac version
Useful JavaScript development tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
