{"id":101514,"date":"2021-09-03T17:29:13","date_gmt":"2021-09-03T09:29:13","guid":{"rendered":"https:\/\/www.keaglegz.com\/?p=101514"},"modified":"2026-06-30T19:10:36","modified_gmt":"2026-06-30T11:10:36","slug":"%e5%9c%a8%e7%ba%bf%e5%88%b7%e5%b0%8f%e7%b1%b3%e8%bf%90%e5%8a%a8%e5%88%b7%e6%ad%a5%e6%95%b0api%e6%8e%a5%e5%8f%a3%e6%ba%90%e7%a0%81","status":"publish","type":"post","link":"https:\/\/www.dongwubaike.cn\/fanhao\/101514.html","title":{"rendered":"\u5728\u7ebf\u5237\u5c0f\u7c73\u8fd0\u52a8\u5237\u6b65\u6570API\u63a5\u53e3\u6e90\u7801"},"content":{"rendered":"\n<p>\u770b\u4e86\u4e00\u4e0b\uff0c\u7f51\u4e0a\u6d41\u4f20\u7684\u90a3\u4e9b\u4e2a\u5c0f\u7c73\u8fd0\u52a8\u5237\u6b65\u6570\u6e90\u7801\u5168\u662fJS\u8c03\u7528\u522b\u4eba\u7684\u6e90\u7801\uff0c\u628a\u81ea\u5df1\u7684\u5e10\u53f7\u5bc6\u7801\u4ea4\u7ed9\u522b\u4eba\u5bb6\uff0c\u535a\u4e3b\u4e2a\u4eba\u5fc3\u7406\u662f\u4e0d\u592a\u8212\u670d\u7684\uff0c\u4e0b\u9762\u662f\u535a\u4e3b\u53c2\u7167JAVA\u9879\u76ee\uff0c\u5199\u4e86\u4e00\u4e2aPHP\u7248\u7684\u7eaf\u63a5\u53e3\u3002<br \/> <a href=\"https:\/\/www.dongwubaike.cn\/fanhao\/wp-content\/uploads\/2021\/09\/772410802.jpg\" data-fancybox=\"images\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dongwubaike.cn\/fanhao\/wp-content\/uploads\/2021\/09\/772410802.jpg\" width=\"2000\" height=\"1192\" alt=\"\u5728\u7ebf\u5237\u5c0f\u7c73\u8fd0\u52a8\u5237\u6b65\u6570API\u63a5\u53e3\u6e90\u7801\" \/><\/a><br \/> \u4ee3\u7801\u8bf7\u81ea\u884c\u7406\u89e3\uff0c\u8c03\u7528\uff0c\u6709\u5c0fBUG\u8bf7\u81ea\u884c\u4fee\u590d\uff0c\u4ee3\u7801\u53ea\u4f9b\u53c2\u8003\uff0c\u52ff\u505a\u975e\u6cd5\u4e4b\u4e8b\uff01<\/p>\n<pre>&lt;?php  \/\/ error_reporting(0);  header(&quot;Access-Control-Allow-Origin:*&quot;);  header(&#x27;Content-type:text\/json; charset=utf-8&#x27;);  $user = &#x27;\u5c0f\u7c73\u8fd0\u52a8\u5e10\u53f7&#x27;;  $pwd = &#x27;\u5c0f\u7c73\u8fd0\u52a8\u5bc6\u7801&#x27;;  $steps = 66666; \/\/ \u8981\u5237\u7684\u6b65\u6570    $code = access_code($user, $pwd);  if (strlen($code) &gt; 3) {      $tokenjson = login_token($code);      $login_token = $tokenjson[&#x27;token_info&#x27;][&#x27;login_token&#x27;];      $user_id = $tokenjson[&#x27;token_info&#x27;][&#x27;user_id&#x27;];      $appjson = get_app_token($login_token);      $user_id = $appjson[&#x27;token_info&#x27;][&#x27;user_id&#x27;];      $app_token = $appjson[&#x27;token_info&#x27;][&#x27;app_token&#x27;];      $t = get_time();      $time = date(&quot;Y-m-d&quot;, time());      $data_json = data_json($time, $steps);      $res = change_steps($t, $user_id,  $app_token, $data_json);      echo $res;  } else {      exit(&quot;\u767b\u5f55\u5931\u8d25&quot;);  }    exit();    function access_code($user, $pwd)  {      $url = &quot;https:\/\/api-user.huami.com\/registrations\/+86{$user}\/tokens&quot;;      $header = [&quot;Content-Type &quot; =&gt; &quot;application\/x-www-form-urlencoded;charset=UTF-8&quot;];      $post_data = array(          &quot;client_id&quot; =&gt; &quot;HuaMi&quot;,          &quot;password&quot; =&gt; $pwd,          &quot;redirect_uri&quot; =&gt; &quot;https:\/\/s3-us-west-2.amazonaws.com\/hm-registration\/successsignin.html&quot;,          &quot;token&quot; =&gt; &quot;access&quot;      );      $ch = curl_init();      curl_setopt($ch, CURLOPT_URL, $url);      curl_setopt($ch, CURLOPT_HTTPHEADER, $header);      curl_setopt($ch, CURLOPT_USERAGENT, &quot;MiFit\/4.6.0 (iPhone; iOS 14.0.1; Scale\/2.00)&quot;);      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);      curl_setopt($ch, CURLOPT_ENCODING, &#x27;gzip,deflate&#x27;);      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);      curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);      curl_setopt($ch, CURLOPT_TIMEOUT, 5);      curl_setopt($ch, CURLOPT_POST, 1);      curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);      curl_setopt($ch, CURLOPT_HEADER, true);      $output =  curl_exec($ch);      preg_match_all(&#x27;\/access=(.*?)&amp;country_code\/i&#x27;, $output, $out);      curl_close($ch);      return $out[1][0];  }  function login_token($code)  {      $url = &quot;https:\/\/account.huami.com\/v2\/client\/login&quot;;      $header = [&quot;Content-Type &quot; =&gt; &quot;application\/x-www-form-urlencoded;charset=UTF-8&quot;];      $post_data = array(          &quot;app_name&quot; =&gt; &quot;com.xiaomi.hm.health&quot;,          &quot;app_version&quot; =&gt; &quot;4.6.0&quot;,          &quot;code&quot; =&gt; $code,          &quot;country_code&quot; =&gt; &quot;CN&quot;,          &quot;device_id&quot; =&gt; &quot;2C8B4939-0CCD-4E94-8CBA-CB8EA6E613A1&quot;,          &quot;device_model&quot; =&gt; &quot;phone&quot;,          &quot;grant_type&quot; =&gt; &quot;access_token&quot;,          &quot;third_name&quot; =&gt; &quot;huami_phone&quot;      );      $ch = curl_init();      curl_setopt($ch, CURLOPT_URL, $url);      curl_setopt($ch, CURLOPT_HTTPHEADER, $header);      curl_setopt($ch, CURLOPT_USERAGENT, &quot;MiFit\/4.6.0 (iPhone; iOS 14.0.1; Scale\/2.00)&quot;);      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);      curl_setopt($ch, CURLOPT_ENCODING, &#x27;gzip,deflate&#x27;);      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);      curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);      curl_setopt($ch, CURLOPT_TIMEOUT, 5);      curl_setopt($ch, CURLOPT_POST, 1);      curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));      $output =  curl_exec($ch);      curl_close($ch);      return json_decode($output, true);  }  function get_time()  {      $url = &quot;http:\/\/api.m.taobao.com\/rest\/api3.do?api=mtop.common.getTimestamp&quot;;      $ch = curl_init();      curl_setopt($ch, CURLOPT_URL, $url);      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);      curl_setopt($ch, CURLOPT_ENCODING, &#x27;gzip,deflate&#x27;);      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);      curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);      curl_setopt($ch, CURLOPT_TIMEOUT, 5);      $output = curl_exec($ch);      curl_close($ch);      return json_decode($output, true)[&#x27;data&#x27;][&#x27;t&#x27;];  }  function get_app_token($login_token)  {      $url = &quot;https:\/\/account-cn.huami.com\/v1\/client\/app_tokens?app_name=com.xiaomi.hm.health&amp;dn=api-user.huami.com%2Capi-mifit.huami.com%2Capp-analytics.huami.com&amp;login_token={$login_token}&amp;os_version=4.1.0&quot;;      $ch = curl_init();      curl_setopt($ch, CURLOPT_URL, $url);      curl_setopt($ch, CURLOPT_USERAGENT, &quot;MiFit\/4.6.0 (iPhone; iOS 14.0.1; Scale\/2.00)&quot;);      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);      curl_setopt($ch, CURLOPT_ENCODING, &#x27;gzip,deflate&#x27;);      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);      curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);      curl_setopt($ch, CURLOPT_TIMEOUT, 5);      $output = curl_exec($ch);      curl_close($ch);      return json_decode($output, true);  }  function data_json($time, $steps)  {      $datas = &#x27;[{&quot;summary&quot;:&quot;{&quot;slp&quot;:{&quot;ss&quot;:73,&quot;lt&quot;:304,&quot;dt&quot;:0,&quot;st&quot;:1589920140,&quot;lb&quot;:36,&quot;dp&quot;:92,&quot;is&quot;:208,&quot;rhr&quot;:0,&quot;stage&quot;:[{&quot;start&quot;:269,&quot;stop&quot;:357,&quot;mode&quot;:2},{&quot;start&quot;:358,&quot;stop&quot;:380,&quot;mode&quot;:3},{&quot;start&quot;:381,&quot;stop&quot;:407,&quot;mode&quot;:2},{&quot;start&quot;:408,&quot;stop&quot;:423,&quot;mode&quot;:3},{&quot;start&quot;:424,&quot;stop&quot;:488,&quot;mode&quot;:2},{&quot;start&quot;:489,&quot;stop&quot;:502,&quot;mode&quot;:3},{&quot;start&quot;:503,&quot;stop&quot;:512,&quot;mode&quot;:2},{&quot;start&quot;:513,&quot;stop&quot;:522,&quot;mode&quot;:3},{&quot;start&quot;:523,&quot;stop&quot;:568,&quot;mode&quot;:2},{&quot;start&quot;:569,&quot;stop&quot;:581,&quot;mode&quot;:3},{&quot;start&quot;:582,&quot;stop&quot;:638,&quot;mode&quot;:2},{&quot;start&quot;:639,&quot;stop&quot;:654,&quot;mode&quot;:3},{&quot;start&quot;:655,&quot;stop&quot;:665,&quot;mode&quot;:2}],&quot;ed&quot;:1589943900,&quot;wk&quot;:0,&quot;wc&quot;:0},&quot;tz&quot;:&quot;28800&quot;,&quot;stp&quot;:{&quot;runCal&quot;:1,&quot;cal&quot;:6,&quot;conAct&quot;:0,&quot;stage&quot;:[],&quot;ttl&quot;:&#x27; . $steps . &#x27;,&quot;dis&quot;:144,&quot;rn&quot;:0,&quot;wk&quot;:5,&quot;runDist&quot;:4,&quot;ncal&quot;:0},&quot;v&quot;:5,&quot;goal&quot;:8000}&quot;,&quot;data&quot;:[{&quot;stop&quot;:1439,&quot;value&quot;:&quot;WhQAUA0AUAAAUAAAUAAAUAAAUAAAWhQAUAYAcBEAUAYAUA8AUAsAUAYAUDIAUCQAUDkAUCkAUD4AUC0AUFcAUD8AU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7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+\/v7+&quot;,&quot;summary_hr&quot;:&quot;{&quot;ct&quot;:0,&quot;id&quot;:[]}&quot;,&quot;date&quot;:&quot;&#x27; . $time . &#x27;&quot;}]&#x27;;      return $datas;  }  function change_steps($t, $user_id, $app_token,  $data_json)  {      $url = &quot;https:\/\/api-mifit-cn.huami.com\/v1\/data\/band_data.json?&amp;t={$t}&quot;;      \/\/ $header = [&quot;Content-Type &quot; =&gt; &quot;application\/x-www-form-urlencoded;charset=UTF-8&quot;];      $header = [&quot;apptoken&quot; =&gt; $app_token];      $post_data = array(          &quot;data_json&quot; =&gt; $data_json,          &quot;userid&quot; =&gt; $user_id,          &quot;device_type&quot; =&gt; &quot;0&quot;,          &quot;last_sync_data_time&quot; =&gt; &quot;1589917081&quot;,          &quot;last_deviceid&quot; =&gt; &quot;DA932FFFFE8816E7&quot;      );      $ch = curl_init();      curl_setopt($ch, CURLOPT_URL, $url);      curl_setopt($ch, CURLOPT_HTTPHEADER,  $header);      curl_setopt($ch, CURLOPT_USERAGENT, &quot;Mozilla\/5.0 (iPhone; CPU iPhone OS 13_4_1 like Mac OS X) AppleWebKit\/605.1.15 (KHTML, like Gecko) Mobile\/15E148 MicroMessenger\/7.0.12(0x17000c2d) NetType\/WIFI Language\/zh_CN&quot;);      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);      curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);      curl_setopt($ch, CURLOPT_TIMEOUT, 5);      curl_setopt($ch, CURLOPT_POST, 1);      curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);      $output =  curl_exec($ch);      curl_close($ch);      \/\/ return json_decode($output, true);      return $output;  }  ?&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u770b\u4e86\u4e00\u4e0b\uff0c\u7f51\u4e0a\u6d41\u4f20\u7684\u90a3\u4e9b\u4e2a\u5c0f\u7c73\u8fd0\u52a8\u5237\u6b65\u6570\u6e90\u7801\u5168\u662fJS\u8c03\u7528\u522b\u4eba\u7684\u6e90\u7801\uff0c\u628a\u81ea\u5df1\u7684\u5e10\u53f7\u5bc6\u7801\u4ea4\u7ed9\u522b\u4eba\u5bb6\uff0c\u535a\u4e3b\u4e2a\u4eba\u5fc3\u7406\u662f\u4e0d\u592a\u8212\u670d\u7684\uff0c\u4e0b\u9762\u662f\u535a\u4e3b\u53c2\u7167JAVA\u9879\u76ee\uff0c\u5199\u4e86\u4e00\u4e2aPHP\u7248\u7684\u7eaf\u63a5\u53e3\u3002<\/p>\n<p> \u4ee3\u7801\u8bf7\u81ea\u884c\u7406\u89e3\uff0c\u8c03\u7528\uff0c\u6709\u5c0fBUG\u8bf7\u81ea\u884c\u4fee\u590d\uff0c\u4ee3\u7801\u53ea\u4f9b\u53c2\u8003\uff0c\u52ff\u505a\u975e\u6cd5\u4e4b\u4e8b\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-101514","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/posts\/101514","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/comments?post=101514"}],"version-history":[{"count":1,"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/posts\/101514\/revisions"}],"predecessor-version":[{"id":284232,"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/posts\/101514\/revisions\/284232"}],"wp:attachment":[{"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/media?parent=101514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/categories?post=101514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dongwubaike.cn\/fanhao\/wp-json\/wp\/v2\/tags?post=101514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}