{"id":29254,"date":"2024-11-25T10:28:20","date_gmt":"2024-11-25T02:28:20","guid":{"rendered":"https:\/\/fwq.ai\/blog\/29254\/"},"modified":"2024-11-25T10:28:20","modified_gmt":"2024-11-25T02:28:20","slug":"%e5%be%ae%e4%bf%a1%e5%bc%80%e5%8f%91%e4%b9%8b%e7%94%a8%e6%88%b7%e7%bb%84%e7%9a%84%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/29254\/","title":{"rendered":"\u5fae\u4fe1\u5f00\u53d1\u4e4b\u7528\u6237\u7ec4\u7684\u4ecb\u7ecd"},"content":{"rendered":"<p style=\"text-align: left\">1:\u521b\u5efa\u7528\u6237\u7ec4<\/p>\n<p style=\"text-align: left\">&nbsp; &nbsp;\u5fae\u4fe1\u8ddfQQ\u4e00\u6837\u53ef\u4ee5\u521b\u5efa\u7ec4\u540d\uff0c\u5220\u9664\u7ec4\u540d\uff0c\u4fee\u6539\u7ec4\u540d\uff0c\u67e5\u8be2\u7ec4\u540d\uff0c\u8fd9\u4e9b\u64cd\u4f5c\u90fd\u662f\u4e00\u7cfb\u5217\u7684\u63a5\u53e3\uff0c\u53ea\u9700\u8981\u8c03\u7528\u76f8\u5173\u7684\u63a5\u53e3\uff0c\u5e76\u4ee5curl\u7684\u5f62\u5f0f\u8fdb\u884c\u53d1\u9001\uff0c\u4fbf\u53ef\u4ee5\u83b7\u5f97\u76f8\u5173\u7684\u7ed3\u679c<\/p>\n<p style=\"text-align: left\">\u521b\u5efa\u5206\u7ec4<\/p>\n<p style=\"text-align: left\">\u4e00\u4e2a\u516c\u4f17\u8d26\u53f7\uff0c\u6700\u591a\u652f\u6301\u521b\u5efa100\u4e2a\u5206\u7ec4\u3002<\/p>\n<p style=\"text-align: left\">\u63a5\u53e3\u8c03\u7528\u8bf7\u6c42\u8bf4\u660e<\/p>\n<p style=\"text-align: left\">http\u8bf7\u6c42\u65b9\u5f0f: POST\uff08\u8bf7\u4f7f\u7528https\u534f\u8bae\uff09https:\/\/api.weixin.qq.com\/cgi-bin\/groups\/create?access_token=ACCESS_TOKEN<\/p>\n<p style=\"text-align: left\">POST\u6570\u636e\u683c\u5f0f\uff1ajson<\/p>\n<p style=\"text-align: left\">POST\u6570\u636e\u4f8b\u5b50\uff1a{&#8220;group&#8221;:{&#8220;name&#8221;:&#8221;test&#8221;}}<\/p>\n<p style=\"text-align: left\">\u53c2\u6570\u8bf4\u660e<\/p>\n<p style=\"text-align: left\">\u53c2\u6570 \u8bf4\u660e<\/p>\n<p style=\"text-align: left\">access_token \u8c03\u7528\u63a5\u53e3\u51ed\u8bc1<\/p>\n<p style=\"text-align: left\">name \u5206\u7ec4\u540d\u5b57\uff0830\u4e2a\u5b57\u7b26\u4ee5\u5185\uff09<\/p>\n<p style=\"text-align: left\">\u8fd4\u56de\u8bf4\u660e \u6b63\u5e38\u65f6\u7684\u8fd4\u56deJSON\u6570\u636e\u5305\u793a\u4f8b\uff1a<\/p>\n<p style=\"text-align: left\">{<\/p>\n<p style=\"text-align: left\">&nbsp; &nbsp; &#8220;group&#8221;: {<\/p>\n<p style=\"text-align: left\">&nbsp; &nbsp; &nbsp; &nbsp; &#8220;id&#8221;: 107,&nbsp;<\/p>\n<p style=\"text-align: left\">&nbsp; &nbsp; &nbsp; &nbsp; &#8220;name&#8221;: &#8220;test&#8221;<\/p>\n<p style=\"text-align: left\">&nbsp; &nbsp; }<\/p>\n<p style=\"text-align: left\">}<\/p>\n<p style=\"text-align: left\">&nbsp; &nbsp;\u4e0b\u9762\u662f\u76f8\u5173\u4ee3\u7801\u7684\u5b9e\u73b0<\/p>\n<p style=\"text-align: left\">\u6211\u4eec\u9700\u8981\u901a\u8fc7curl\u7684\u5f62\u5f0f\u5c06\u6570\u636e\u5305\u53d1\u9001\u8fc7\u53bb\uff0c\u8fd4\u56de\u7684\u7ed3\u679c\u662f\u4e00\u4e2aStdClass\u5f62\u5f0f\u7684json\u6570\u636e\uff0c\u6211\u4eec\u9700\u8981\u5c06stdClass\u8fdb\u884c\u8f6c\u6362\u4e3a\u6570\u7ec4\u5f62\u5f0f\uff0c\u6240\u4ee5\u6211\u4eec\u521b\u5efa\u4e00\u4e2afunc.php\u6587\u4ef6\uff0c\u540e\u9762\u7684\u7ec4\u7684\u76f8\u5173\u64cd\u4f5c\u90fd\u57fa\u4e8e\u8fd9\u4e9b\u51fd\u6570<\/p>\n<pre>&lt;?php \r\n       \/\/\u8bbe\u5b9aappID \u548csecret\r\n\t   define (\"APPID\",\"wx70fe852945a945b6\",true);\r\n\t   define (\"SECRET\",'d05c2fc161d71c8317331a39044a7d93',true);\r\n\t   $APPID=\"wx70fe852945a945b6\";\r\n\t   $SECRET=\"d05c2fc161d71c8317331a39044a7d93\";\r\n      function curl($url,$data=null)\r\n\t  {\r\n\t\t   \/\/\u521d\u59cb\u5316\r\n\t\t   $curl=curl_init();\r\n\t\t   curl_setopt($curl, CURLOPT_URL, $url);\/\/\u8bbe\u7f6e\u4f20\u8f93\u94fe\u63a5\r\n           curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);\/\/\u8bbe\u7f6eSSL\u51ed\u8bc1\r\n           curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false );\r\n           curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\/\/\u662f\u5426\u663e\u793a\u5728\u6d4f\u89c8\u5668\u4e0a\r\n\t\t   if(!empty($data))\r\n\t\t   {\r\n\t\t\t   \/\/\u8fdb\u884cpost\u6570\u636e\r\n\t\t\t   curl_setopt($curl,CURLOPT_POST,1);\r\n\t\t\t   curl_setopt($curl,CURLOPT_POSTFIELDS,$data);\r\n\t\t\t   }\r\n\t\t\t$result=curl_exec($curl);\/\/\u6267\u884ccurl\r\n\t\t\tcurl_close($curl);\/\/\u5173\u95edcurl\r\n\t\t\treturn $result;\r\n\t\t  }\r\n\t\t   function transition ($data)\r\n\t  {\r\n\t\t    if(is_object($data))\r\n\t\t\t{\r\n\t\t\t\t  $data=(array)$data;\r\n\t\t\t\t}\r\n\t\t\tif(is_array($data))\r\n\t\t\t{\r\n\t\t\t\t foreach($data as $key=&gt;$value)\r\n\t\t\t\t {\r\n\t\t\t\t\t   $data[$key]=transition($value);\r\n\t\t\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\treturn $data;\r\n\t\t  }\r\n\t\t  \/\/\u5c06\u591a\u7ef4\u6570\u7ec4\u8f6c\u6210\u5b57\u7b26\u4e32\r\n\t\t   function recount($result)\r\n\t\t{\r\n\t\t\t    if(is_array($result))\r\n\t\t\t\t{\r\n\t\t\t   foreach($result as $key=&gt;$value)\r\n\t\t\t   {    \r\n\t\t\t\t  recount($value); \r\n\t\t\t\t  return $value;\r\n\t\t\t\t   }\r\n\t\t\t\t  \r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t  \/\/access_token\u94fe\u63a5\u5730\u5740\r\n\t\t  $access_token_url=\"https:\/\/api.weixin.qq.com\/cgi-bin\/token?grant_type=client_credential&amp;appid=$APPID&amp;secret=$SECRET\";\r\n\t\t \/\/\u83b7\u53d6access_token.\u5c06\u8fd4\u56de\u7684json\u683c\u5f0f\u8f6c\u6210\u6570\u7ec4,\u8fd4\u56de\u4e00\u4e2a\u6570\u7ec4\u5f62\u5f0f\u7684access_token\r\n\t\t $access_token=(array)json_decode(curl($access_token_url));\r\n\t\t $access_token=$access_token['access_token'];\r\n\t\t\r\n?&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"text-align: left\">\u5229\u7528\u4e0a\u9762\u7684access_token\u6211\u4eec\u4fbf\u53ef\u4ee5\u505a\u6211\u4eec\u60f3\u505a\u7684\u4efb\u4f55\u4e8b\u4e86<\/p>\n<p style=\"text-align: left\">\u9996\u5148\u6211\u4eec\u8fdb\u884c\u7ec4\u7684\u521b\u5efa\uff0c\u6211\u4eec\u5c06\u6587\u4ef6\u547d\u540d\u4e3acreategroup.php<\/p>\n<p style=\"text-align: left\">&nbsp; &nbsp; &nbsp;1 &nbsp;\u754c\u9762\u5c55\u793a<\/p>\n<p style=\"text-align: left\">\u770b\u8d77\u6765\u5f88\u7b80\u5355\u7684HTML\u7684\u4ee3\u7801\uff0c\u76f8\u4fe1\u6709HTML\u57fa\u7840\u7684\u90fd\u80fd\u5199\u51fa<\/p>\n<p style=\"text-align: left\">&nbsp;\u90a3\u4e48\u5982\u4f55\u521b\u5efa\u7ec4\u5462\uff1f\u5f88\u7b80\u5355\uff0c\u6211\u4eec\u53ea\u9700\u5c06\u521b\u5efa\u7ec4\u7684API\u94fe\u63a5\u63d0\u4ea4\u8fc7\u53bb\u5c31\u53ef\u4ee5\u4e86<\/p>\n<p style=\"text-align: left\">\u76f8\u5173\u7684\u4ee3\u7801<\/p>\n<pre>  &lt;?php  echo '&lt;meta http-equiv=\"content-type\" content=\"text\/html; charset=utf-8\"&gt;'; \r\n?&gt;\r\n&lt;!doctype html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;\u65e0\u6807\u9898\u6587\u6863&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n      &lt;form action=\"#\" method=\"post\"&gt;\r\n         &lt;p&gt;\u65b0\u5efa\u5206\u7ec4&lt;\/p&gt;\r\n         &lt;input type=\"text\" name=\"tag\" placeholder=\"\u65b0\u5efa\u4e00\u4e2a\u5206\u7ec4\"&gt;\r\n         &lt;input type=\"submit\" name=\"-1\" id=\"sub\" value=\"\u63d0\u4ea4\"&gt;\r\n         \r\n      &lt;\/form&gt;\r\n      &lt;?php \r\n\t     \/\/\u5982\u679c\u63d0\u4ea4\u6210\u529f,\u90a3\u4e48\u8fdb\u884c\u7ec4\u7684\u521b\u5efa\r\n\t         if(isset($_POST[-1]))\r\n\t\t\t  {\r\n\t          \r\n\t\t\t     function create_group()\r\n\t\t\t\t{    require \"func.php\";\r\n\t\t\t\t\t $create_url=\"https:\/\/api.weixin.qq.com\/cgi-bin\/tags\/create?access_token=$access_token\";\r\n\t\t\t         $tag=$_POST['tag'];\/\/\u83b7\u53d6\u7ec4\u540d\r\n\t\t\t\t\t$poststr=\"\r\n\t\t\t\t\t          {\r\n\t\t\t\t\t\t\t\t  \"tag\":\r\n\t\t\t\t\t\t\t\t      {\r\n\t\t\t\t\t\t\t\t\t\t  \"name\":\"$tag\";\r\n\t\t\t\t\t\t\t\t\t  }\r\n\t\t\t\t\t\t\t\t  }\r\n\t\t\t\t\t\";\t\t\r\n\t\t\t\t\tif($result=curl($create_url,$poststr))\r\n\t{\r\n\t\t echo \"&lt;script type=\"text\/javascript\"&gt;alert('\u6267\u884c\u6210\u529f,\u4e09\u79d2\u4e4b\u540e\u5c06\u81ea\u52a8\u8df3\u56de\u4e3b\u9875')&lt;\/script&gt;\";\r\n\t\t \/\/\u8bbe\u7f6e\u8df3\u8f6c\u56de\u4e3b\u9875\r\n\t\t  echo \"&lt;script type=\"text\/javascript\"&gt;setTimeout(window.navigate(\"getgroup.php\"),3000)&lt;\/script&gt;\";\r\n\t\t}\r\n\telse\r\n\t{echo \"&lt;script type=\"text\/javascript\"&gt;alert('\u6267\u884c\u5931\u8d25')&lt;\/script&gt;\";}\r\n\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcreate_group();\r\n\t\t\t  }\r\n\t\t\t  \r\n\t  ?&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"text-align: left\">2:\u63a5\u4e0b\u6765\u662f\u5c55\u793a\u6240\u6709\u7684\u7ec4\u540d\uff0c\u6211\u4eec\u5148\u770b\u770b\u5fae\u4fe1\u5b98\u65b9\u7684\u6587\u6863<\/p>\n<p style=\"text-align: left\">&nbsp; &nbsp;\u67e5\u8be2\u6240\u6709\u5206\u7ec4<\/p>\n<p style=\"text-align: left\">\u63a5\u53e3\u8c03\u7528\u8bf7\u6c42\u8bf4\u660e<\/p>\n<p style=\"text-align: left\">http\u8bf7\u6c42\u65b9\u5f0f: GET\uff08\u8bf7\u4f7f\u7528https\u534f\u8bae\uff09https:\/\/api.weixin.qq.com\/cgi-bin\/groups\/get?access_token=ACCESS_TOKEN<\/p>\n<p style=\"text-align: left\">\u53c2\u6570\u8bf4\u660e<\/p>\n<p style=\"text-align: left\">\u53c2\u6570 \u8bf4\u660e<\/p>\n<p style=\"text-align: left\">access_token \u8c03\u7528\u63a5\u53e3\u51ed\u8bc1<\/p>\n<p style=\"text-align: left\">\u8fd4\u56de\u8bf4\u660e \u6b63\u5e38\u65f6\u7684\u8fd4\u56deJSON\u6570\u636e\u5305\u793a\u4f8b\uff1a<\/p>\n<pre>{\r\n    \"groups\": [\r\n        {\r\n            \"id\": 0, \r\n            \"name\": \"\u672a\u5206\u7ec4\", \r\n            \"count\": 72596\r\n        }, \r\n        {\r\n            \"id\": 1, \r\n            \"name\": \"\u9ed1\u540d\u5355\", \r\n            \"count\": 36\r\n        }, \r\n        {\r\n            \"id\": 2, \r\n            \"name\": \"\u661f\u6807\u7ec4\", \r\n            \"count\": 8\r\n        }, \r\n        {\r\n            \"id\": 104, \r\n            \"name\": \"\u534e\u4e1c\u5a92\", \r\n            \"count\": 4\r\n        }, \r\n        {\r\n            \"id\": 106, \r\n            \"name\": \"\u4e0d\u6d4b\u8bd5\u7ec4\", \r\n            \"count\": 1\r\n        }\r\n    ]\r\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"text-align: left\">\u53c2\u6570\u8bf4\u660e<\/p>\n<p style=\"text-align: left\">\u53c2\u6570 \u8bf4\u660e<\/p>\n<p style=\"text-align: left\">groups \u516c\u4f17\u5e73\u53f0\u5206\u7ec4\u4fe1\u606f\u5217\u8868<\/p>\n<p style=\"text-align: left\">id \u5206\u7ec4id\uff0c\u7531\u5fae\u4fe1\u5206\u914d<\/p>\n<p style=\"text-align: left\">name \u5206\u7ec4\u540d\u5b57\uff0cUTF8\u7f16\u7801<\/p>\n<p style=\"text-align: left\">count \u5206\u7ec4\u5185\u7528\u6237\u6570\u91cf<\/p>\n<p style=\"text-align: left\">\u9519\u8bef\u65f6\u7684JSON\u6570\u636e\u5305\u793a\u4f8b\uff08\u8be5\u793a\u4f8b\u4e3aAppID\u65e0\u6548\u9519\u8bef\uff09\uff1a<\/p>\n<p style=\"text-align: left\">&nbsp; &nbsp; \u5b98\u65b9\u6587\u6863\u5bf9\u4e8e\u8fd4\u56de\u7684json\u6570\u636e\u5df2\u7ecf\u5f88\u660e\u4e86\u4e86\uff0c\u4e00\u4e2a\u7ec4\u540d\u91cc\u8fb9\u5305\u542b\u4e86\u57fa\u672c\u7684\u4fe1\u606f\uff0c\u7ec4id\uff0c\u7ec4\u540d\u4ee5\u53ca\u7ec4\u5185\u7684\u7528\u6237\u6570\u91cf\u3002\u6211\u4eec\u65e0\u6cd5\u76f4\u63a5\u5c06\u8fd4\u56de\u7684json\u6570\u636e\u76f4\u63a5\u663e\u793a\u5230\u9875\u9762\u4e0a\uff0c\u90a3\u4e48\u6211\u4eec\u5982\u4f55\u89e3\u6790json\u5462\uff1f\u5fae\u4fe1\u7ed9\u6211\u4eec\u8fd4\u56de\u7684\u662f\u4e00\u4e2astdclass\u7c7b\u578b\u7684json\uff0c\u6240\u4ee5\u7b2c\u4e00\u6b65\u6211\u4eec\u9700\u8981\u5c06json\u8f6c\u4e3a\u6570\u7ec4\uff0cphp\u4e2d\u6709\u4e00\u4e2ajson_decode()\u51fd\u6570\uff0c\u6b64\u51fd\u6570\u80fd\u591f\u5c06json\u6570\u636e\u8f6c\u4e3astdclass\u7684\u6570\u7ec4\uff0cstdclass\u5e76\u4e0d\u7b49\u4e8e\u6570\u7ec4\uff0c\u6240\u4ee5\u6211\u4eec\u8fd8\u8981\u8bb2stdclass\u8f6c\u5316\u4e3aarray\u5f62\u5f0f\uff0c\u5728func.php\u4e2dtransition()\u51fd\u6570\u5c31\u6709\u8fd9\u6837\u7684\u529f\u80fd\u3002<\/p>\n<p style=\"text-align: left\">\u6211\u4eec\u5148\u770b\u770b\u9875\u9762\u663e\u793a\u6837\u5b50\uff0c\u770b\u770b\u6211\u4eec\u901a\u8fc7curl\u4ece\u817e\u8baf\u4e0a\u83b7\u53d6\u7684\u6570\u636e\u662f\u4ec0\u4e48\u6837\u7684<\/p>\n<p style=\"text-align: left\">\u4e0a\u56fe\u6211\u4eec\u521b\u5efa\u4e86\u4e00\u4e2a\u8868\uff0c\u7b2c\u4e00\u884c\u662f\u4e00\u4e2a\u521b\u5efa\u65b0\u7ec4\u7684\u529f\u80fd\uff0c\u5728\u4ee5\u4e0b\u7684\u884c\u4e2d\uff0c\u6211\u4eec\u80fd\u591f\u770b\u5230\u7ec4\u7f16\u53f7\uff0c\u7ec4\u540d\uff0c\u4ee5\u53ca\u7ec4\u5185\u4eba\u6570\u3002\u90a3\u4e48\u8fd9\u4e2a\u662f\u5982\u4f55\u505a\u5230\u7684\u5462\uff1f\u5f88\u7b80\u5355\uff0c\u5f53\u6211\u4eec\u5df2\u7ecf\u83b7\u53d6\u5230\u8fd4\u56de\u56de\u6765\u7684json\u6570\u636e\u4e4b\u540e\uff0c\u6211\u4eec\u5bf9json\u8fdb\u884c\u6570\u636e\u5305\u88c5\uff0c\u628ajson\u505a\u6210\u6570\u7ec4\u5f62\u5f0f\u3002\u90a3\u4e48\u5982\u4f55\u5b9e\u73b0\u6570\u636e\u5305\u88c5\u5462\uff1f\u4e5f\u5f88\u7b80\u5355\uff0c\u6211\u4eec\u4e0d\u65ad\u7684\u8c03\u7528\u89e3\u6790\u51fd\u6570\uff0c\u5c06\u5b83\u6700\u7ec8\u53d8\u4e3a\u6570\u7ec4\u7684\u5f62\u5f0f\uff0c\u7136\u540e\u904d\u5386\u8fd9\u4e2a\u6570\u7ec4\u5c31\u884c\u4e86\u3002<\/p>\n<p style=\"text-align: left\">\u5c55\u793a\u6e90\u4ee3\u7801\uff1agetGroup.php<\/p>\n<pre>&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&gt;\r\n&lt;?php  \r\n      require \"func.php\";\r\n  $groupurl=\"https:\/\/api.weixin.qq.com\/cgi-bin\/groups\/get?access_token={$access_token}\";\r\n  $result=json_decode(curl($groupurl));\/\/\u83b7\u53d6\u5305\u88c5\u4e4b\u540e\u7684\u6570\u636e\uff0c\u4ee5\u6570\u7ec4\u7684\u5f62\u5f0f\u5b58\u50a8\r\n  \/\/$result=curl($groupurl);\r\n   \/\/\u5c06STDclass\u7c7b\u578b\u8f6c\u4e3a\u6570\u7ec4\u7c7b\u578b\r\n  function G_transition ($data)\r\n  {\r\n    if(is_object($data))\r\n{\r\n  $data=(array)$data;\r\n}\r\nif(is_array($data))\r\n{\r\n foreach($data as $key=&gt;$value)\r\n&nbsp;{\r\n&nbsp;&nbsp;&nbsp;$data[$key]=G_transition($value);\r\n&nbsp;}\r\n}\r\nreturn&nbsp;$data;\r\n&nbsp;&nbsp;}\r\n&nbsp;&nbsp;$result=G_transition($result);&nbsp;&nbsp;\r\n&nbsp;&nbsp;function&nbsp;G_recount($result)\r\n{\r\n&nbsp;&nbsp;&nbsp;&nbsp;if(is_array($result))\r\n{\r\n&nbsp;&nbsp;&nbsp;foreach($result&nbsp;as&nbsp;$key=&amp;gt;$value)\r\n&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;\r\n&nbsp;&nbsp;G_recount($value);&nbsp;\r\n&nbsp;&nbsp;return&nbsp;$value;\r\n&nbsp;&nbsp;&nbsp;}\r\n}\r\n}\r\n$resultG=G_recount($result);\r\necho&nbsp;\"&lt;table&gt;\";\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;\"&lt;tr&gt;&lt;th&gt;&lt;a&gt;\u521b\u5efa\u4e00\u4e2a\u65b0\u7ec4&lt;\/a&gt;&lt;\/th&gt;&lt;\/tr&gt;\";\r\n&nbsp;echo&nbsp;\"&lt;th&gt;\u7f16\u53f7&lt;\/th&gt;\n&lt;th&gt;\u7ec4\u540d&lt;\/th&gt;\n&lt;th&gt;\u4eba\u6570&lt;\/th&gt;\";\r\nfor($i=0;$i&lt;count&gt;\";\r\n&nbsp;foreach&nbsp;($resultG[$i]&nbsp;as&nbsp;$key=&amp;gt;$value)\r\n&nbsp;&nbsp;&nbsp;{&nbsp;\r\n&nbsp;&nbsp;if($key=='id')\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;echo&nbsp;\"&lt;td&gt;[$value]&lt;a&gt;\u5220\u9664&lt;\/a&gt;&lt;a&gt;\u4fee\u6539&lt;\/a&gt;\n&lt;\/td&gt;\";\r\n&nbsp;&nbsp;}\r\n&nbsp;&nbsp;else&nbsp;\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;\"&lt;td&gt;&nbsp;$value&lt;\/td&gt;\";\r\n&nbsp;&nbsp;}\r\n}\r\necho&nbsp;\"\";\r\n}\r\necho&nbsp;\"&lt;\/count&gt;\n&lt;\/table&gt;\";\r\n?&amp;gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/div&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;hr&gt;&nbsp;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;hr&gt;\n&lt;p style=\"text-align: left;\"&gt;&nbsp; 3:\u6211\u4eec\u5982\u4f55\u4fee\u6539\u5206\u7ec4\u540d&lt;\/p&gt;\n&lt;p style=\"text-align: left;\"&gt;&nbsp; &nbsp; &nbsp;\u4fee\u6539\u5206\u7ec4\u540d&lt;\/p&gt;\n&lt;p style=\"text-align: left;\"&gt;\u63a5\u53e3\u8c03\u7528\u8bf7\u6c42\u8bf4\u660e&lt;\/p&gt;\n&lt;p style=\"text-align: left;\"&gt;http\u8bf7\u6c42\u65b9\u5f0f: POST\uff08\u8bf7\u4f7f\u7528https\u534f\u8bae\uff09https:\/\/api.weixin.qq.com\/cgi-bin\/groups\/update?access_token=ACCESS_TOKEN&lt;\/p&gt;\n&lt;p style=\"text-align: left;\"&gt;POST\u6570\u636e\u683c\u5f0f\uff1ajson&lt;\/p&gt;\n&lt;p style=\"text-align: left;\"&gt;POST\u6570\u636e\u4f8b\u5b50\uff1a{\"group\":{\"id\":108,\"name\":\"test2_modify2\"}}&lt;\/p&gt;\n&lt;p style=\"text-align: left;\"&gt;\u53c2\u6570\u8bf4\u660e&lt;\/p&gt;\n&lt;p style=\"text-align: left;\"&gt;\u53c2\u6570\t\u8bf4\u660e&lt;\/p&gt;\n&lt;p style=\"text-align: left;\"&gt;access_token\t\u8c03\u7528\u63a5\u53e3\u51ed\u8bc1&lt;\/p&gt;\n&lt;p style=\"text-align: left;\"&gt;id\t\u5206\u7ec4id\uff0c\u7531\u5fae\u4fe1\u5206\u914d&lt;\/p&gt;\n&lt;p style=\"text-align: left;\"&gt;name\t\u5206\u7ec4\u540d\u5b57\uff0830\u4e2a\u5b57\u7b26\u4ee5\u5185\uff09&lt;\/p&gt;\n&lt;p style=\"text-align: left;\"&gt;\u8fd4\u56de\u8bf4\u660e \u6b63\u5e38\u65f6\u7684\u8fd4\u56deJSON\u6570\u636e\u5305\u793a\u4f8b\uff1a&lt;\/p&gt;\n&lt;p style=\"text-align: left;\"&gt;{\"errcode\": 0, \"errmsg\": \"ok\"}&lt;\/p&gt;\n&lt;p style=\"text-align: left;\"&gt;\u9519\u8bef\u65f6\u7684JSON\u6570\u636e\u5305\u793a\u4f8b\uff08\u8be5\u793a\u4f8b\u4e3aAppID\u65e0\u6548\u9519\u8bef\uff09\uff1a&lt;\/p&gt;\n&lt;p style=\"text-align: left;\"&gt;&nbsp; \u5b98\u65b9\u6587\u6863\u63d0\u4f9b\u4e86\u4fee\u6539\u5206\u7ec4\u540d\u7684\u63a5\u53e3\uff0c\u6240\u4ee5\u6211\u4eec\u53ef\u4ee5\u505a\u4e00\u4e2a\u4fee\u6539\u7684\u94fe\u63a5\u548c\u4e00\u4e2a\u4fee\u6539\u7ec4\u7684modify.php\u6587\u4ef6&lt;\/p&gt;\n&lt;p style=\"text-align: left;\"&gt;&nbsp; &nbsp;\u6839\u636e\u5b98\u65b9\u6587\u6863\uff0c\u6211\u4eec\u9700\u8981\u901a\u8fc7\u7ec4id\u624d\u80fd\u8fdb\u884c\u4fee\u6539\uff0c\u6839\u636e\u6211\u4eec\u5728\u521b\u5efa\u7ec4\u7684\u65f6\u5019\u4f20\u8f93\u8fc7\u6765\u7684json\u6570\u636e\u4e2d\u6211\u4eec\u53ef\u4ee5\u83b7\u53d6\u5230\u7ec4id,\u6240\u6709\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u521b\u5efa\u94fe\u63a5\u7684\u65b9\u5f0f\uff0c\u5f53\u70b9\u51fb\u94fe\u63a5\u7684\u65f6\u5019\uff0c\u4f1a\u628a\u7ec4id\u4ee5get\u7684\u65b9\u5f0f\u4f20\u9001\u5230modify\u6587\u4ef6\u4e2d\uff0c\u800cmodify.php\u53ef\u4ee5\u901a\u8fc7$_GET\u7684\u5f62\u5f0f\u63a5\u6536\u7ec4id.&lt;\/p&gt;\n&lt;p style=\"text-align: left;\"&gt;&nbsp; &nbsp;\u6211\u4eec\u5148\u5199\u597d\u8fd9\u4e2a\u4f20\u9001\u7ec4id\u7684\u94fe\u63a5\uff0c&lt;\/p&gt;\n&lt;pre class=\"brush:php;toolbar:false\"&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for($i=0;$i&lt;count&gt;\";\r\n&nbsp;foreach&nbsp;($resultG[$i]&nbsp;as&nbsp;$key=&amp;gt;$value)\r\n&nbsp;&nbsp;&nbsp;{&nbsp;\r\n&nbsp;&nbsp;if($key=='id')\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;echo&nbsp;\"&lt;td&gt;[$value]&lt;a&gt;\u5220\u9664&lt;\/a&gt;&lt;a&gt;\u4fee\u6539&lt;\/a&gt;\n&lt;\/td&gt;\";\r\n&nbsp;&nbsp;}\r\n&nbsp;&nbsp;else&nbsp;\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;\"&lt;td&gt;&nbsp;$value&lt;\/td&gt;\";\r\n&nbsp;&nbsp;}\r\n}\r\necho&nbsp;\"\";\r\n}&lt;\/count&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"text-align: left\">\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u5bf9\u8fd4\u56de\u7684\u6570\u7ec4\u8fdb\u884c\u904d\u5386\uff0c\u5982\u679c\u53d1\u73b0key\u503c\u662fid\uff0c\u90a3\u4e48\u6211\u4eec\u5c06\u503c\u83b7\u53d6\u8fc7\u6765\u5e76\u4e14\u52a0\u5165\u5230\u94fe\u63a5\u5c3e\u90e8\uff0c\u6ce8\u610fget\u65b9\u5f0f\u7684\u5199\u6cd5<\/p>\n<p style=\"text-align: left\">&nbsp; &nbsp; &nbsp; echo &#8220;<\/p>\n<p> [$value]   &#8220;; <\/p>\n<p style=\"text-align: left\">\u8df3\u8f6c\u5230modify.php\u9875\u9762\u540e\uff0c\u6211\u4eec\u8fdb\u884c\u76f8\u5173\u7684\u5904\u7406\uff0c\u5728\u8be5\u9875\u9762\u4e0a\uff0c\u6211\u4eec\u4ecd\u7136\u6709\u4e00\u4e2aHTML\u8f93\u5165\u6846<\/p>\n<p style=\"text-align: left\">\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>&nbsp;&nbsp;&nbsp;&nbsp;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<p>\u66f4\u65b0\u7ec4\u540d<\/p>\n<p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(&#8220;$result&#8221;); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8220;; \/\/\u8fdb\u884c\u9875\u9762\u8df3\u8f6c &nbsp;echo&nbsp;&#8220;&lt;script&gt; setTimeout(window.location.href=&#8221;getgroup.php&#8221;,3000); &lt;\/script&gt;&#8221;; &nbsp;&nbsp;} else { &nbsp;echo&nbsp;&#8220;&lt;script&gt; alert(&#039;wrong&#039;); &lt;\/script&gt;&#8221;; } } if(isset($_POST[&#8216;-1&#8217;])) { modify(); } ?&gt; <\/p>\n<p style=\"text-align: left\">\u5982\u679c\u6267\u884c\u6210\u529f\uff0c\u90a3\u4e48\u4f1a\u8fdb\u884c\u5f39\u51fa\u63d0\u9192\u6846,\u7b49\u5f85\u4e94\u79d2\u540e\u81ea\u52a8\u8df3\u8f6c\u56degetGroup.php\u9875\u9762<\/p>\n<p style=\"text-align: left\">4:\u5220\u9664\u7ec4<\/p>\n<p style=\"text-align: left\">&nbsp; &nbsp;\u7ec4\u540d\u4e00\u822c\u4e0d\u5141\u8bb8\u5220\u9664\uff0c\u4f46\u662f\u5fae\u4fe1\u5e73\u53f0\u4ecd\u7136\u7ed9\u51fa\u4e86\u76f8\u5173\u7684\u5220\u9664\u63a5\u53e3<\/p>\n<p style=\"text-align: left\">&nbsp; &nbsp;\u6ce8\u610f\u672c\u63a5\u53e3\u662f\u5220\u9664\u4e00\u4e2a\u7528\u6237\u5206\u7ec4\uff0c\u5220\u9664\u5206\u7ec4\u540e\uff0c\u6240\u6709\u8be5\u5206\u7ec4\u5185\u7684\u7528\u6237\u81ea\u52a8\u8fdb\u5165\u9ed8\u8ba4\u5206\u7ec4\u3002 \u63a5\u53e3\u8c03\u7528\u8bf7\u6c42\u8bf4\u660e<\/p>\n<p style=\"text-align: left\">http\u8bf7\u6c42\u65b9\u5f0f: POST\uff08\u8bf7\u4f7f\u7528https\u534f\u8bae\uff09https:\/\/api.weixin.qq.com\/cgi-bin\/groups\/delete?access_token=ACCESS_TOKEN<\/p>\n<p style=\"text-align: left\">POST\u6570\u636e\u683c\u5f0f\uff1ajson<\/p>\n<p style=\"text-align: left\">POST\u6570\u636e\u4f8b\u5b50\uff1a{&#8220;group&#8221;:{&#8220;id&#8221;:108}}<\/p>\n<p style=\"text-align: left\">\u53c2\u6570\u8bf4\u660e<\/p>\n<p style=\"text-align: left\">\u53c2\u6570 \u8bf4\u660e<\/p>\n<p style=\"text-align: left\">access_token \u8c03\u7528\u63a5\u53e3\u51ed\u8bc1<\/p>\n<p style=\"text-align: left\">group \u5206\u7ec4<\/p>\n<p style=\"text-align: left\">id \u5206\u7ec4\u7684id<\/p>\n<p style=\"text-align: left\">\u8fd4\u56de\u8bf4\u660e \u6b63\u5e38\u65f6\u7684\u8fd4\u56deJSON\u6570\u636e\u5305\u793a\u4f8b\uff1a<\/p>\n<p style=\"text-align: left\">\u901a\u8fc7\u4f20\u9012\u7684json\u6570\u636e\uff0c\u6211\u4eec\u53ea\u9700\u8981\u5c06\u7ec4id\u8fdb\u884c\u4f20\u9012\u5230delete.php\u9875\u9762\u5e76\u8fdb\u884c\u76f8\u5173\u7684\u5220\u9664\u64cd\u4f5c\u5373\u53ef<\/p>\n<p style=\"text-align: left\">&nbsp;\u4ee3\u7801\u663e\u793a\uff1a<\/p>\n<pre>&nbsp;&nbsp;&nbsp;&nbsp;&lt;?php  \r\n    \/\/\u8be5\u6bb5\u7a0b\u5e8f\u7528\u6765\u5220\u9664\u7ec4\u6807\u7b7e\uff0c\u6210\u529f\u4e4b\u540e\u4f1a\u7ed9\u4e88\u63d0\u793a\uff0c\u5e76\u4e14\u8df3\u8f6c\u56degetgroup.php\u9875\u9762\r\nfunction delete()\r\n{\r\n$num=$_GET[&#039;num&#039;];\/\/\u63a5\u6536\u6765\u81eagetgroup\u9875\u9762\u7684\u7f16\u53f7\r\nrequire \"func.php\";\r\n$delete_url=\"https:\/\/api.weixin.qq.com\/cgi-bin\/tags\/delete?access_token=$access_token\";\r\n$data=json_encode(array(\"tag\"=&gt;array(\"id\"=&amp;gt;$num)));\r\n\/\/\u5982\u679ccurl\u51fd\u6570\u6267\u884c\u6210\u529f,\u90a3\u4e48\u4f1a\u8fd4\u56de\u4e00\u4e2a\u72b6\u6001\u503c\r\nif($result=curl($delete_url,$data))\r\n{\r\n&nbsp;echo&nbsp;\"&lt;script&gt;alert(&#039;\u6267\u884c\u6210\u529f,\u4e09\u79d2\u4e4b\u540e\u5c06\u81ea\u52a8\u8df3\u56de\u4e3b\u9875&#039;)&lt;\/script&gt;\";\r\n&nbsp;\/\/\u8bbe\u7f6e\u8df3\u8f6c\u56de\u4e3b\u9875\r\n&nbsp;&nbsp;echo&nbsp;\"&lt;script&gt;setTimeout(window.history.back(-1),8000)&lt;\/script&gt;\";\r\n}\r\nelse\r\n{echo&nbsp;\"&lt;script&gt;alert(&#039;\u6267\u884c\u5931\u8d25&#039;)&lt;\/script&gt;\";}\r\n}\r\ndelete();\r\n?&amp;gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p style=\"text-align: left\">5:\u5bf9\u7ec4\u6210\u5458\u8fdb\u884c\u6279\u91cf\u79fb\u52a8<\/p>\n<p style=\"text-align: left\">&nbsp; &nbsp;\u6709\u65f6\u5019\u6211\u4eec\u9700\u8981\u5bf9\u7ec4\u5185\u7684\u6210\u5458\u8fdb\u884c\u79fb\u52a8\u5230\u5176\u4ed6\u7684\u7ec4\u91cc\u9762\uff0c\u5728\u8fd9\u70b9\u4e0a\uff0c\u5fae\u4fe1\u5e73\u53f0\u4e5f\u7ed9\u51fa\u4e86\u76f8\u5e94\u7684\u63a5\u53e3\u6211\u4eec\u5148\u770b\u5b98\u65b9\u7684\u6587\u6863\u8bf4\u660e<\/p>\n<p style=\"text-align: left\">&nbsp; &nbsp; \u6279\u91cf\u79fb\u52a8\u7528\u6237\u5206\u7ec4<\/p>\n<p style=\"text-align: left\">\u63a5\u53e3\u8c03\u7528\u8bf7\u6c42\u8bf4\u660e<\/p>\n<p style=\"text-align: left\">http\u8bf7\u6c42\u65b9\u5f0f: POST\uff08\u8bf7\u4f7f\u7528https\u534f\u8bae\uff09https:\/\/api.weixin.qq.com\/cgi-bin\/groups\/members\/batchupdate?access_token=ACCESS_TOKEN<\/p>\n<p style=\"text-align: left\">POST\u6570\u636e\u683c\u5f0f\uff1ajson<\/p>\n<p style=\"text-align: left\">POST\u6570\u636e\u4f8b\u5b50\uff1a{&#8220;openid_list&#8221;:[&#8220;oDF3iYx0ro3_7jD4HFRDfrjdCM58&#8243;,&#8221;oDF3iY9FGSSRHom3B-0w5j4jlEyY&#8221;],&#8221;to_groupid&#8221;:108}<\/p>\n<p style=\"text-align: left\">\u53c2\u6570\u8bf4\u660e<\/p>\n<p style=\"text-align: left\">\u53c2\u6570 \u8bf4\u660e<\/p>\n<p style=\"text-align: left\">access_token \u8c03\u7528\u63a5\u53e3\u51ed\u8bc1<\/p>\n<p style=\"text-align: left\">openid_list \u7528\u6237\u552f\u4e00\u6807\u8bc6\u7b26openid\u7684\u5217\u8868\uff08size\u4e0d\u80fd\u8d85\u8fc750\uff09<\/p>\n<p style=\"text-align: left\">to_groupid \u5206\u7ec4id<\/p>\n<p style=\"text-align: left\">\u8fd4\u56de\u8bf4\u660e \u6b63\u5e38\u65f6\u7684\u8fd4\u56deJSON\u6570\u636e\u5305\u793a\u4f8b\uff1a<\/p>\n<p style=\"text-align: left\">{&#8220;errcode&#8221;: 0, &#8220;errmsg&#8221;: &#8220;ok&#8221;}<\/p>\n<p style=\"text-align: left\">&nbsp;\u4ece\u4f20\u9012\u7684json\u6570\u636e\u53ef\u4ee5\u770b\u5230\uff0c\u5177\u6709\u4e00\u4e2aopen_list\u548c\u4e00\u4e2ato_groupid\uff0c\u5206\u522b\u8868\u793a\u8981\u79fb\u52a8\u7684\u7ec4\u6210\u5458\u7684openid\u548c\u5c06\u8981\u79fb\u52a8\u7684\u7ec4id.\u90a3\u4e48\u6211\u4eec\u5982\u4f55\u5f00\u59cb\u79fb\u52a8\u5462\uff1f\u73b0\u5728\u5df2\u57fa\u672c\u6e05\u695a\u4e86\uff0c\u53ea\u9700\u8981\u628aopenid\u4f20\u9012\u5230open_list,\u5c06\u7ec4id\u4f20\u9012\u5230to_groupid\u4e2d\uff0c\u7136\u540e\u5c06\u5305\u88c5\u597d\u7684json\u6570\u636e\u901a\u8fc7curl\u51fd\u6570post\u8fc7\u53bb.\u5728\u6279\u91cf\u5206\u7ec4\u4e4b\u524d\uff0c\u6211\u4eec\u8fd8\u8981\u77e5\u9053\u4e00\u4ef6\u4e8b\uff0c\u5982\u4f55\u83b7\u53d6\u7528\u6237\u7684\u76f8\u5173\u4fe1\u606f\uff0c\u8fd9\u4e2a\u4fe1\u606f\u6307\u7684\u662f\u7528\u6237\u5fae\u4fe1\u4e0a\u8bbe\u7f6e\u7684\u6027\u522b\uff0c\u7701\u4efd\uff0c\u56fd\u5bb6\uff0c\u8bed\u8a00\uff0c\u6240\u5c5e\u7ec4\u7b49\u7b49\u7684\u76f8\u5173\u4fe1\u606f\uff0c\u540c\u6837\uff0c\u5fae\u4fe1\u63d0\u4f9b\u4e86\u83b7\u53d6\u7528\u6237\u4fe1\u606f\u7684\u63a5\u53e3\uff0c\u53c2\u7167\u4e0a\u8ff0\u89e3\u51b3\u65b9\u6cd5\u5c31\u53ef\u4ee5\u83b7\u53d6\u5230\u7528\u6237\u7684\u76f8\u5173\u7684\u4fe1\u606f<\/p>\n<p style=\"text-align: left\">\u4ee5\u4e0b\u662f\u83b7\u53d6\u5230\u7684\u7528\u6237\u8868<\/p>\n<p style=\"text-align: left\">\u901a\u8fc7\u7b2c\u4e00\u5217\u7684\u9009\u62e9\u4e4b\u540e\uff0c\u5728\u9009\u62e9\u8981\u5206\u7684\u7ec4\uff0c\u70b9\u51fb\u79fb\u52a8\u5c31\u53ef\u4ee5\u5c06\u7528\u6237\u79fb\u52a8\u5230\u60f3\u8981\u7684\u7ec4\u91cc\u9762\uff0c\u4e0b\u56fe\u662f\u79fb\u52a8\u540e\u7684\u5c55\u793a<\/p>\n<p style=\"text-align: left\">\u6240\u5c5e\u7ec4\u7f16\u53f7\u53d1\u751f\u4e86\u53d8\u5316<\/p>\n<p style=\"text-align: left\">\u6e90\u4ee3\u7801\u5c55\u793a<\/p>\n<pre><\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<hr>\n<table>\n  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<tbody>\n<tr>\n<th>\u9009\u62e9\u79fb\u52a8<\/th>\n<p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<th>\u6635\u79f0<\/th>\n<p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<th>\u6027\u522b<\/th>\n<p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<th>\u8bed\u8a00<\/th>\n<p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<th>\u6240\u5728\u57ce\u5e02<\/th>\n<p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<th>\u7701\u4efd<\/th>\n<p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<th>\u56fd\u5bb6<\/th>\n<p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<th>\u5934\u50cf<\/th>\n<p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<th>\u52a0\u5165\u65f6\u95f4<\/th>\n<p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<th>\u5907\u6ce8\u540d<\/th>\n<p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<th>\u6240\u5c5e\u7ec4<\/th>\n<p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n<th> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;; &nbsp;$count=count($resultG); &nbsp;foreach($resultG&nbsp;as&nbsp;$key)\/\/\u904d\u5386\u5305\u88c5\u597d\u7684json\u6570\u636e,\u5df2\u7ecf\u8f6c\u6210\u4e86\u591a\u7ef4\u6570\u7ec4 &nbsp;{ &nbsp;echo&nbsp;&#8220;$key[name]&nbsp;&#8220;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$count&#8211;;&nbsp;&nbsp;\/\/\u83b7\u53d6\u7ec4ID &nbsp;} echo&nbsp;&#8220;&#8221;;&nbsp; echo&nbsp;&#8220;&#8221;; ?&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/th>\n<p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;; &nbsp;&nbsp;&nbsp;$info_url=&#8221;https:\/\/api.weixin.qq.com\/cgi-bin\/user\/info?access_token=$access_token&amp;openid=$value&amp;lang=zh_CN&#8221;; &nbsp;&nbsp;&nbsp;$info=transition(json_decode(curl($info_url)));&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/var_dump($info); &nbsp;&nbsp;&nbsp;\/\/echo&nbsp;&#8220;&#8221;; &nbsp;&nbsp;\/\/&nbsp;&nbsp;global&nbsp;$userinfo; \/\/$userinfo=$info; \/\/var_dump($userinfo); &nbsp;&nbsp;&nbsp;foreach($info&nbsp;as&nbsp;$key=&gt;$value) &nbsp;&nbsp;&nbsp;{ &nbsp;&nbsp;&nbsp;\/\/\u5bf9\u8868\u683c\u8fdb\u884c\u76f8\u5173\u7684\u4fee\u9970,\u8fdb\u884c\u76f8\u5173\u7684\u5224\u65ad &nbsp;&nbsp;&nbsp;&nbsp;switch($key) {&nbsp; &nbsp;&nbsp;\/\/\u5982\u679c\u662fid\uff0c\u90a3\u4e48\u505a\u6210\u4e00\u4e2a\u590d\u9009\u6846 &nbsp;case&nbsp;&#8220;openid&#8221;: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;&#8221; <\/p>\n<td> &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<p>&#8220;; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;&#8220;subscribe&#8221;:\/\/\u5ffd\u7565\u76f8\u5173\u7684\u63cf\u8ff0\uff0c\u4e0d\u5bf9\u8fd9\u4e2a\u5b57\u6bb5\u751f\u6210\u5217 &nbsp;break; &nbsp;\/\/\u5982\u679c\u662f\u6027\u522b\uff0c\u6027\u522b\u503c1\u4ee3\u8868\u7537\uff0c0\u4ee3\u8868\u5973\uff0c2\u4ee3\u8868\u5e76\u672a\u586b\u5199 &nbsp;case&nbsp;&#8220;sex&#8221;: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if($value==1) &nbsp;&nbsp;{ &nbsp;echo&nbsp;&#8221; <\/p>\n<td>\u7537<\/td>\n<p>&#8220;;&nbsp;} &nbsp;&nbsp;else&nbsp;if($value==0) &nbsp;&nbsp;{ &nbsp;echo&nbsp;&#8221; <\/p>\n<td>\u5973<\/td>\n<p>&#8220;;&nbsp;&nbsp;} &nbsp;else &nbsp;&nbsp;&nbsp;{ &nbsp;&nbsp;&nbsp;echo&nbsp;&#8221; <\/p>\n<td>\u6682\u672a\u586b\u5199<\/td>\n<p>&#8220;;&nbsp;} &nbsp;&nbsp;break; &nbsp;\/\/\u5982\u679c\u662f\u5934\u50cf\u94fe\u63a5,\u90a3\u4e48\u751f\u6210\u4e00\u4e2a50*50\u50cf\u7d20\u7684\u56fe\u7247 &nbsp;case&nbsp;&#8220;headimgurl&#8221;; &nbsp;echo&nbsp;&#8221; <\/p>\n<td> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<p>&#8220;; &nbsp;break; &nbsp;\/\/\u4ee5\u4e0b\u662f\u9ed8\u8ba4\u5217 &nbsp;case&nbsp;&#8220;nickname&#8221;: &nbsp;case&nbsp;&#8220;language&#8221;: &nbsp;case&nbsp;&#8220;city&#8221;: &nbsp;case&nbsp;&#8220;province&#8221;: &nbsp;case&nbsp;&#8220;country&#8221;: &nbsp;case&nbsp;&#8220;subscribe_time&#8221;: &nbsp;echo&nbsp;&#8221; <\/p>\n<td>$value<\/td>\n<p>&#8220;; &nbsp;break; &nbsp;\/\/\u5982\u679cremark\u7684\u503c\u4e3a\u7a7a,\u90a3\u4e48\u5907\u6ce8\u540d\u662f\u7a7a\u503c &nbsp;case&nbsp;&#8220;remark&#8221;: &nbsp;&nbsp;if(empty($value)) &nbsp;&nbsp;{ &nbsp;&nbsp;&nbsp;echo&nbsp;&#8221; <\/p>\n<td>\u6682\u65e0<\/td>\n<p>&#8220;; &nbsp;&nbsp;} else { echo&nbsp;&#8221; <\/p>\n<td>$value<\/td>\n<p>&#8220;; } break; case&nbsp;&#8220;groupid&#8221;: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&#8221; <\/p>\n<td>$value<\/td>\n<p>&#8220;; &nbsp;&nbsp;break; } &nbsp;&nbsp;&nbsp;} &nbsp;echo&nbsp;&#8220;&#8221;; } &nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;?&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br \/>\n  <\/tr>\n<\/tbody>\n<\/table>\n<p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1:\u521b\u5efa\u7528\u6237\u7ec4 &nbsp; &nbsp;\u5fae\u4fe1\u8ddfQQ\u4e00\u6837\u53ef\u4ee5\u521b\u5efa\u7ec4\u540d\uff0c\u5220\u9664\u7ec4\u540d\uff0c\u4fee\u6539\u7ec4\u540d\uff0c\u67e5\u8be2\u7ec4\u540d\uff0c\u8fd9\u4e9b\u64cd\u4f5c\u90fd\u662f\u4e00\u7cfb\u5217\u7684\u63a5\u53e3\uff0c\u53ea\u9700\u8981\u8c03\u7528\u76f8\u5173\u7684\u63a5\u53e3\uff0c\u5e76\u4ee5curl\u7684\u5f62\u5f0f\u8fdb\u884c\u53d1\u9001\uff0c\u4fbf\u53ef\u4ee5\u83b7\u5f97\u76f8\u5173\u7684\u7ed3\u679c \u521b\u5efa\u5206\u7ec4 \u4e00\u4e2a\u516c\u4f17\u8d26\u53f7\uff0c\u6700\u591a\u652f\u6301\u521b\u5efa100\u4e2a\u5206\u7ec4\u3002 \u63a5\u53e3\u8c03\u7528\u8bf7\u6c42\u8bf4\u660e http\u8bf7\u6c42\u65b9\u5f0f: POST\uff08\u8bf7\u4f7f\u7528https\u534f\u8bae\uff09https:\/\/api.weixin.qq.com\/cgi-bin\/groups\/create?access_token=ACCESS_TOKEN POST\u6570\u636e\u683c\u5f0f\uff1ajson POST\u6570\u636e\u4f8b\u5b50\uff1a{&#8220;group&#8221;:{&#8220;name&#8221;:&#8221;test&#8221;}} \u53c2\u6570\u8bf4\u660e \u53c2\u6570 \u8bf4\u660e access_token \u8c03\u7528\u63a5\u53e3\u51ed\u8bc1 name \u5206\u7ec4\u540d\u5b57\uff0830\u4e2a\u5b57\u7b26\u4ee5\u5185\uff09 \u8fd4\u56de\u8bf4\u660e \u6b63\u5e38\u65f6\u7684\u8fd4\u56deJSON\u6570\u636e\u5305\u793a\u4f8b\uff1a { &nbsp; &nbsp; &#8220;group&#8221;: { &nbsp; &nbsp; &nbsp; &nbsp; &#8220;id&#8221;: 107,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8220;name&#8221;: &#8220;test&#8221; &nbsp; &nbsp; } } &nbsp; &nbsp;\u4e0b\u9762\u662f\u76f8\u5173\u4ee3\u7801\u7684\u5b9e\u73b0 \u6211\u4eec\u9700\u8981\u901a\u8fc7curl\u7684\u5f62\u5f0f\u5c06\u6570\u636e\u5305\u53d1\u9001\u8fc7\u53bb\uff0c\u8fd4\u56de\u7684\u7ed3\u679c\u662f\u4e00\u4e2aStdClass\u5f62\u5f0f\u7684json\u6570\u636e\uff0c\u6211\u4eec\u9700\u8981\u5c06stdClass\u8fdb\u884c\u8f6c\u6362\u4e3a\u6570\u7ec4\u5f62\u5f0f\uff0c\u6240\u4ee5\u6211\u4eec\u521b\u5efa\u4e00\u4e2afunc.php\u6587\u4ef6\uff0c\u540e\u9762\u7684\u7ec4\u7684\u76f8\u5173\u64cd\u4f5c\u90fd\u57fa\u4e8e\u8fd9\u4e9b\u51fd\u6570 &lt;?php \/\/\u8bbe\u5b9aappID \u548csecret define (&#8220;APPID&#8221;,&#8221;wx70fe852945a945b6&#8243;,true); define (&#8220;SECRET&#8221;,&#8217;d05c2fc161d71c8317331a39044a7d93&#8242;,true); $APPID=&#8221;wx70fe852945a945b6&#8243;; $SECRET=&#8221;d05c2fc161d71c8317331a39044a7d93&#8243;; function curl($url,$data=null) { [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-29254","post","type-post","status-publish","format-standard","hentry","category-19"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/29254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=29254"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/29254\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=29254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=29254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=29254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}