{"id":72384,"date":"2020-04-25T19:22:19","date_gmt":"2020-04-25T11:22:19","guid":{"rendered":"http:\/\/4563.org\/?p=72384"},"modified":"2020-04-25T19:22:19","modified_gmt":"2020-04-25T11:22:19","slug":"php%e6%8a%96%e9%9f%b3%e5%8e%bb%e6%b0%b4%e5%8d%b0%e6%ba%90%e7%a0%81","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=72384","title":{"rendered":"php\u6296\u97f3\u53bb\u6c34\u5370\u6e90\u7801"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>\u4f60\u5c31\u662f\u6211\u7684\u552f\u4e00<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>php\u6296\u97f3\u53bb\u6c34\u5370\u6e90\u7801<\/h3>\n<p>  \t\t&lt;?php<br \/>  \/\/by \u52e4\u52e4\u5b66\u957f<br \/>  \/\/\u4f7f\u7528\u65b9\u6cd5 \u57df\u540d\/dyapi.php?url=https:\/\/v.douyin.com\/TudRFh\/<br \/>  \u00a0<br \/>  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0$url = $_GET[&#8216;url&#8217;];<br \/>  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0$res = qqxz_http_get($url);<br \/>  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0preg_match(&#8216;\/href=&quot;(.*?)&quot;&gt;Found\/&#8217;, $res, $matches);<br \/>  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0$Xurl = str_replace(&#8216;&amp;&#8217;, &#8216;&amp;&#8217;, $matches);<br \/>  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0$res = qqxz_http_get($Xurl);<br \/>  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0preg_match(&#8216;\/itemId: &quot;(.*?)&quot;,\/&#8217;, $res, $matches);<br \/>  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0$itemId = $matches;<br \/>  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0$url = &#8216;https:\/\/www.iesdouyin.com\/web\/api\/v2\/aweme\/iteminfo\/?item_ids=&#8217; . $itemId;<br \/>  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0$res = qqxz_http_get($url);<br \/>  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0$arr = json_decode($res, true);\/\/\u4f5c\u54c1\u4fe1\u606f\u83b7\u53d6<br \/>  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0$play_addr_url = $arr[&#8216;item_list&#8217;][&quot;video&quot;][&quot;play_addr&quot;][&quot;url_list&quot;];<br \/>  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0$res = qqxz_http_get($play_addr_url);<br \/>  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0preg_match(&#8216;\/href=&quot;(.*?)&quot;&gt;Found\/&#8217;, $res, $matches);<br \/>  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0$videoUrl = str_replace(&#8216;&amp;&#8217;, &#8216;&amp;&#8217;, $matches);<br \/>  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0$douyin = [&#8216;code&#8217; =&gt; 1, &#8216;url&#8217; =&gt; $videoUrl];<br \/>  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0echo json_encode($douyin);<br \/>  \u00a0<br \/>  \u00a0<br \/>  \u00a0<br \/>  \u00a0<br \/>  function qqxz_http_get($url)<br \/>  {<br \/>  \u00a0\u00a0\u00a0\u00a0$Header=array( &quot;User-Agent:Mozilla\/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit\/604.1.38 (KHTML, like Gecko) Version\/11.0 Mobile\/15A372 Safari\/604.1&quot;);<br \/>  \u00a0\u00a0\u00a0\u00a0$con=curl_init((string)$url);<br \/>  \u00a0\u00a0\u00a0\u00a0curl_setopt($con,CURLOPT_HEADER,False);<br \/>  \u00a0\u00a0\u00a0\u00a0curl_setopt($con,CURLOPT_SSL_VERIFYPEER,False);<br \/>  \u00a0\u00a0\u00a0\u00a0curl_setopt($con,CURLOPT_RETURNTRANSFER,true);<br \/>  \u00a0\u00a0\u00a0\u00a0curl_setopt($con,CURLOPT_HTTPHEADER,$Header);<br \/>  \u00a0\u00a0\u00a0\u00a0curl_setopt($con,CURLOPT_TIMEOUT,5000);<br \/>  \u00a0\u00a0\u00a0\u00a0$result = curl_exec($con);<br \/>  \u00a0\u00a0\u00a0\u00a0return $result;<br \/>  }<br \/>  \u00a0<br \/>  ?&gt;\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u830e\u809b\u4e92\u64b8\u5a03<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u6211\u76f8\u4fe1\u5927\u5bb6\u90fd\u4e0d\u559c\u6b22\u7528\u522b\u4eba\u7684api\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>tufu001<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t666<br \/>  \u611f\u8c22\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>lanchenyuan<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u55ef\u600e\u4e48\u642d\u5efaAPI\u653e\u51fa\u6765\u8fd8\u6709\u70b9\u5438\u5f15\u529b\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>b66667777<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u8c22\u8c22\u5206\u4eab\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u4eba\u6c11\u5e01<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u6709\u6ca1\u6709\u56fd\u9645\u7248\u7684\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f60\u5c31\u662f\u6211\u7684\u552f\u4e00 \u5927\u4f6c\u6709\u8bdd\u8bf4 : p&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/72384"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=72384"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/72384\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=72384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=72384"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=72384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}