小米运动APP刷步API接口
步数可同步到支付宝、微信

接口地址: https://api.ooomn.com/api/mi

返回格式: json

请求方式: GET,POST

请求示例: https://api.ooomn.com/api/mi?user=小米运动APP手机帐号&pwd=小米运动APP登录密码&step=要刷的步数,建议不超过30000

请求参数说明:

名称 必填 类型 说明
user string 小米运动APP账号(不保存账号)
pwd string 小米运动APP密码(不保存密码)
step string 要刷的步数,建议不超过3万步(最大99999步)

返回参数说明:

名称 类型 说明

返回示例:

{
    "code": 200,
    "msg": "success",
    "user": "131****1850",
    "step": "111"
}

请求参数设置:

参数名称 参数值 操作


					{
    "code": 200,
    "msg": "success",
    "user": "131****1850",
    "step": "111"
}				

错误码格式说明:

名称 类型 说明

代码示例:

<?php
header('Content-type:text/json;charset=utf-8;');
$user = '小米运动APP手机账号';
$pwd= '小米运动APP密码';
$step = rand(10000,30000);
$api = 'https://api.ooomn.com/api/mi?user=' . $user . '&pwd=' . $pwd . '&step=' . $step;
$url = YunTu($api);
echo $url;

function YunTu($url)
{
$ch = curl_init();
$timeout = 30;
$ua= $_SERVER['HTTP_USER_AGENT'];
$ip = $_SERVER['REMOTE_ADDR'];
$http_type = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) ? 'https://' : 'http://';
$urls = $http_type . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_REFERER,$urls);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-FORWARDED-FOR:'.$ip, 'CLIENT-IP:'.$ip));
curl_setopt($ch, CURLOPT_USERAGENT, $ua);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
$content = curl_exec($ch);
curl_close($ch);
return $content;
}
?>