站点工具

New release available: 2020-07-29 "Hogfather". upgrade now! [51.3] (what's this?)
New release candidate 3 available: 2020-06-09 "Hogfather". upgrade now! [51.2] (what's this?)
New release candidate 2 available: 2020-06-01 "Hogfather". upgrade now! [51.1] (what's this?)
New release candidate available: 2020-06-01 "Hogfather". upgrade now! [51] (what's this?)
Hotfix release available: 2018-04-22c "Greebo". upgrade now! [50.3] (what's this?)
Hotfix release available: 2018-04-22b "Greebo". upgrade now! [50.2] (what's this?)
Hotfix release available: 2018-04-22a "Greebo". upgrade now! [50.1] (what's this?)
New release available: 2018-04-22 "Greebo". upgrade now! [50] (what's this?)
Hotfix release available: 2017-02-19g "Frusterick Manners". upgrade now! [49.7] (what's this?)
Hotfix release available: 2017-02-19f "Frusterick Manners". upgrade now! [49.6] (what's this?)
Hotfix release available: 2017-02-19e "Frusterick Manners". upgrade now! [49.5] (what's this?)
Hotfix release available fixing CVE-2017-12979 and CVE-2017-12980: 2017-02-19d "Frusterick Manners". upgrade now! [49.4] (what's this?)
Hotfix release available fixing CVE-2017-12583: 2017-02-19c "Frusterick Manners". upgrade now! [49.3] (what's this?)
Hotfix release available fixing security token and media manager: 2017-02-19b "Frusterick Manners". upgrade now! [49.2] (what's this?)
Hotfix release available fixing install and media manager issues: 2017-02-19a "Frusterick Manners". upgrade now! [49.1] (what's this?)
New release available: 2017-02-19 "Frusterick Manners". upgrade now! [49] (what's this?)
Hotfix release available: 2016-06-26e "Elenor of Tsort". upgrade now! [48.5] (what's this?)
Hotfix release available fixing CVE-2017-12979 and CVE-2017-12980: 2016-06-26d "Elenor of Tsort". upgrade now! [48.4] (what's this?)
Hotfix release available fixing CVE-2017-12583: 2016-06-26c "Elenor of Tsort". upgrade now! [48.3] (what's this?)
Hotfix release available fixing security token: 2016-06-26b "Elenor of Tsort". upgrade now! [48.2] (what's this?)
Hotfix release available fixing authad issues: 2016-06-26a "Elenor of Tsort". upgrade now! [48.1] (what's this?)
New release available: 2016-06-26 "Elenor of Tsort". upgrade now! [48] (what's this?)
Hotfix release available: 2015-08-10a "Detritus". upgrade now! [47.1] (what's this?)
New release available: 2015-08-10 "Detritus". upgrade now! [47] (what's this?)
Hotfix release available: 2014-09-29d "Hrun". upgrade now! [46.4] (what's this?)
Hotfix release available: 2014-09-29c "Hrun". upgrade now! [46.3] (what's this?)
Hotfix release available to prevent XSS attack via SWF uploads: 2014-09-29b "Hrun". upgrade now! [46.2] (what's this?)
Hotfix release available: 2014-09-29a "Hrun". upgrade now! [46.1] (what's this?)
New release available: 2014-09-29 "Hrun". upgrade now! [46] (what's this?)
Hotfix release available: 2014-05-05e "Ponder Stibbons". upgrade now! [44.5] (what's this?)
Hotfix release available: 2014-05-05d "Ponder Stibbons". upgrade now! [44.4] (what's this?)
Hotfix release available to prevent XSS attack via SWF uploads: 2014-05-05c "Ponder Stibbons". upgrade now! [44.3] (what's this?)
Security Hotfix 2014-05-05b to prevent zero byte attacks on external auth systems is available. upgrade now! [44.2] (what's this?)
Security Hotfix 2014-05-05a for Issue 765 available. upgrade now! [44.1] (what's this?)

ipush

iOS消息推送接口

1、服务器 DeviceToken 接收接口

https://m.repai.com/user/appoid_ios_devicetoken_put_api/appkey/密钥编号/appoid/手机设备唯一编号/devicetoken/苹果的DeviceToken串/token/73191b75734ea67df90cbb824ff67811

输入参数说明:

  • appkey 【热拍卖家版Android客户端的appkey为100005,iOS为100004;买家版HTML5为100001,iOS为100002,Android为100003】
  • appoid 【设备的唯一ID,iOS手机取OpenUDID(下载地址:https://github.com/ylechelle/OpenUDID)作为唯一ID;#import “OpenUDID.h” 然后 NSLog(@“%@”,[OpenUDID value]); 打印出来的值即为OpenUDID,然后对OpenUDID做md5加密后的值,作为appoid】
  • devicetoken 【苹果APNS设备DeviceToken值,对原始的DeviceToken值需要按照以下方式做处理,提交给服务器】
  • token 【防篡改验证串,token值的组成为,以PHP代码为例:md5(“RP”.$appkey.$appsecret.$appoid.$devicetoken) 由客户端生成,其中 $appsecret为密钥,每个appkey对应的不同的密钥,密钥请询问张宴】
在iOS应用的***AppDelegate.m文件中,添加以下内容:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  	//获取 device token 信息
  	[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
   (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
}

//成功取到device token时
- (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken
{
  	NSLog(@"获取到的原始device token是: %@", deviceToken);

  	NSString *dtoken = [[deviceToken description] stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"<>"]]; //去掉"<>"
  	dtoken = [[dtoken description] stringByReplacingOccurrencesOfString:@" " withString:@""];//去掉中间空格
  	NSLog(@"去掉特殊符号和空格后的device token是: %@", dtoken);

  	//发送 Device Token 到服务器(省略)

输出参数说明:

  • JSON格式输出,错误时,status值为false,reason值为错误原因文本信息,示例如下:
{
"reason": "TOKEN验证未通过,非法请求!",
"status": false
}
  • JSON格式输出,正确时,status值也为true,示例如下:
{
"reason": "服务器接收成功。",
"status": true
}

2、PHP内部引用的根据iOS手机appkey和appoid查询对应的device token信息

<?php
//PHP模拟的iOS手机device token提交服务器示例
require_once("/Data/webapps/m.repai.com/m/phpapi.php"); //PHP引用方式,需要引用的框架入口文件
$appkey = "100005";
$appsecret = "4da05c10cc26ee997086188ec2cdb8f8";
$appoid = "d19149dd97b17ce55e70abd2f9e64d3d";
$devicetoken = "test_devicetoken";
$token = md5("RP".$appkey.$appsecret.$appoid.$devicetoken);
$devicetoken_upload = 		file_get_contents("https://m.repai.com/user/appoid_ios_devicetoken_put_api/appkey/".$appkey."/appoid/".$appoid."/devicetoken/".$devicetoken."/token/".$token);
var_dump(json_decode($devicetoken_upload, true));

//PHP模拟的通过appkey和appoid查询device token信息
$parameters_array["appkey"] = "100005";
$parameters_array["appoid"] = "59153b1fba317dd01c3414c4f9f5b87d"; //此处的appoid为iOS提交的原始appoid进行md5后的值
$result = phpapi_mvc("user", "appoid_ios_devicetoken_get_phpapi", $parameters_array);
var_dump($result);
?>

输入参数说明:

  • appkey 【热拍卖家版Android客户端的appkey为100005,iOS为100004;买家版HTML5为100001,iOS为100002,Android为100003】
  • appoid 【设备的唯一ID的md5值,android手机取网卡mac地址的md5值作为唯一ID;iOS手机取OpenUDID作为唯一ID。这里的appoid不是客户端提交的原始appoid,而是原始appoid md5后的值】

3、HTTP方式调用的苹果 APNS 消息推送接口

  • 热拍买家版iOS正式证书 ApplePush 服务器:
http://phprm.lan.repaiapp.com:61002/ (内网,服务器程序调用,外网无法访问,password密码为repai)
http://phprm.wan.repaiapp.com:61002/ (外网,仅供外网测试用,正式程序不要调用,password密码为repai)
  • 热拍卖家版iOS正式证书 ApplePush 服务器:
http://phprm.lan.repaiapp.com:61004/ (内网,服务器程序调用,外网无法访问,password密码为repai)
http://phprm.wan.repaiapp.com:61004/ (外网,仅供外网测试用,正式程序不要调用,password密码为repai)
ApplePush 1.0

苹果iOS设备(iPhone、iPad、iPod...)APNS(Apple Push Notification Service)消息推送中转器

URL接口地址:
http://IP地址:端口/send?password=密码&device_token=苹果设备令牌&message=消息内容&badge_number=数字&sound=声音文件名

URL参数说明:
password=调用本HTTP接口的校验密码
device_token=iPhone、iPad设备的device token名
message=要发送的消息文本
badge_number=iOS应用图标右上角显示的红色数字
sound=声音提示文件名

相关接口:根据用户rp_uid查询手机设备唯一编号appoid接口

返回首页

ipush.txt · 最后更改: 2014/07/23 11:11 由 106.2.171.114