{"id":1492,"date":"2019-05-05T21:28:09","date_gmt":"2019-05-05T13:28:09","guid":{"rendered":"http:\/\/www.baishitou.cn\/?p=1492"},"modified":"2021-04-25T15:13:14","modified_gmt":"2021-04-25T07:13:14","slug":"%e7%bb%87%e6%a2%a6dedecms5-7%e7%99%be%e5%ba%a6%e4%b8%bb%e5%8a%a8%e6%8e%a8%e9%80%81%e5%ae%9e%e6%97%b6%e5%8f%91%e5%b8%83%e6%96%87%e7%ab%a0%e6%97%b6%e4%b8%bb%e5%8a%a8%e6%8f%90%e4%ba%a4%e5%88%b0","status":"publish","type":"post","link":"https:\/\/www.baishitou.cn\/1492.html","title":{"rendered":"\u7ec7\u68a6dedecms5.7\u767e\u5ea6\u4e3b\u52a8\u63a8\u9001(\u5b9e\u65f6),\u53d1\u5e03\u6587\u7ae0\u65f6\u4e3b\u52a8\u63d0\u4ea4\u5230\u767e\u5ea6\uff0c\u53ef\u52a0\u5feb\u767e\u5ea6\u8718\u86db\u6293\u53d6\u901f\u5ea6"},"content":{"rendered":"

\u7ec7\u68a6\u767e\u5ea6\u4e3b\u52a8\u63a8\u9001\u65b9\u6cd5\u4e00<\/h2>\n

\u6253\u5f00\/dede\/article_add.php,\u641c\u7d22<\/p>\n

ClearMyAddon($arcID, $title);<\/pre>\n

\u5927\u7ea6\u5728260\u884c\uff0c\u5728\u5b83\u4e0a\u9762\u6dfb\u52a0<\/p>\n

else{\r\n$urls[]='http:\/\/'.$_SERVER['HTTP_HOST'].$artUrl;  \r\n$api = 'http:\/\/data.zz.baidu.com\/urls?site=\u4f60\u7684\u57df\u540d&token=\u51c6\u5165\u5bc6\u94a5<\/span>';\r\n$ch = curl_init();\r\n$options =  array(\r\n    CURLOPT_URL => $api,\r\n    CURLOPT_POST => true,\r\n    CURLOPT_RETURNTRANSFER => true,\r\n    CURLOPT_POSTFIELDS => implode(\"\\n\", $urls),\r\n    CURLOPT_HTTPHEADER => array('Content-Type: text\/plain'),\r\n);\r\ncurl_setopt_array($ch, $options);\r\n$result = curl_exec($ch);\r\n}<\/code><\/pre>\n

\u6ce8\u610f\uff0c\u7ea2\u8272\u4ee3\u7801\uff0c\u662f\u4f60\u5728\u767e\u5ea6\u7ad9\u957f\u540e\u53f0\u83b7\u53d6\u7684\u63a5\u53e3\u8c03\u7528\u5730\u5740\u3002<\/p>\n

\"20180105212544\"<\/p>\n

\u641c\u7d22<\/p>\n

<a href='catalog_do.php?cid=$typeid&dopost=listArchives'><u>\u5df2\u53d1\u5e03\u6587\u7ae0\u7ba1\u7406<\/u><\/a><\/code><\/pre>\n

\u5728\u5b83\u4e0b\u9762\u6dfb\u52a0\uff1a<\/p>\n

<a href=''><u>\u767e\u5ea6\u63d0\u4ea4\u8fd4\u56de\".$result.\"<\/u><\/a>\r\n&nbsp;&nbsp;<\/code><\/pre>\n

\u8fd9\u4e2a\u662f\u6dfb\u52a0\u6587\u7ae0\u540e\u8fd4\u56de\u662f\u4e0d\u662f\u6210\u529f\u63d0\u4ea4\u4e86\u3002<\/p>\n

\"\u767e\u5ea6\u4e3b\u52a8\u63a8\u9001\"<\/a><\/p>\n

 <\/p>\n

\u4e0a\u56fe\u5c31\u662f\u8868\u793a1\u6761\u63d0\u4ea4\u6210\u529f\uff0c\u8fd8\u5269\u4e0b4999998\u6761\u53ef\u63d0\u4ea4\u3002<\/p>\n

\u4e0b\u56fe\u7684\u8fd9\u4e2a\u7ad9\u662f\u6700\u65b0\u51e0\u5929\u624d\u6dfb\u52a0\u7684\u8fd9\u4e2a\u529f\u80fd\u3002\u6587\u7ae0\u5185\u5bb9\u4e5f\u662f\u6bcf\u5929\u66f4\u65b0\u4e00\u5230\u4e24\u7bc7\u3002\u4e00\u822c\u63a8\u9001\u540e\u8fc7\u4e00\u4e24\u5929\u624d\u80fd\u770b\u5230\u6548\u679c.<\/p>\n

 <\/p>\n

 <\/p>\n

\"20180105211134\"<\/a><\/p>\n

\u7ec7\u68a6\u767e\u5ea6\u4e3b\u52a8\u63a8\u9001\u65b9\u6cd5\u4e8c<\/h2>\n

1\u3001\u540e\u53f0-\u7cfb\u7edf-\u57fa\u672c\u53c2\u6570\uff0c\u6dfb\u52a0\u65b0\u53d8\u91cf\uff0c<\/p>\n

 <\/p>\n

\u53d8\u91cf\u540d\u79f0\uff1acfg_baidu_push<\/p>\n

\u53d8\u91cf\u503c\uff1a\u91cc\u9762\u586b\u5199\u4f60\u4ece\u767e\u5ea6\u83b7\u53d6\u7684\u9700\u8981\u63a8\u9001\u57df\u540d\u7684\u53c2\u6570\uff1ahttp:\/\/data.zz.baidu.com\/urls?site=https:\/\/www.441516.com<\/span>&token=Wgn313aE0GAxfuaI<\/span>\uff0c\u4fdd\u5b58\uff0c\u5982\u679c\u53d8\u91cf\u503c\u672a\u586b\u5199\u6216\u8005\u4e3a\u7a7a\u5c06\u4e0d\u63a8\u9001\u3002<\/p>\n

\u53c2\u6570\u8bf4\u660e\uff1a\u767e\u5ea6\u63a8\u9001\u63a5\u53e3<\/p>\n

\"\"<\/a><\/p>\n

2\u3001\u6253\u5f00 \/dede\/inc\/inc_archives_functions.php \u5728\u6587\u4ef6\u6700\u672b\u5c3e\u63d2\u5165\u4e0b\u9762\u4ee3\u7801<\/p>\n

\/**\r\n * \u767e\u5ea6\u4e3b\u52a8\u63a8\u9001\r\n *\/\r\nfunction baidu_push($id=\"\",$qstr=\"\")\r\n{\r\n\tglobal $cfg_multi_site,$cfg_basehost,$cfg_baidu_push;\r\n\tif(!empty($id) && !empty($cfg_baidu_push))\r\n\t{\r\n\t\tif( !empty($id) && empty($qstr) ) $qstr = $id;\r\n\t\tif($qstr=='')\r\n\t\t{\r\n\t\t\texit();\r\n\t\t}\r\n\t\t$qstrs = explode('`',$qstr);\r\n\t\t$cfg_domain = $cfg_multi_site == 'N' ? $cfg_basehost : '';\r\n\t\t$urls = array();\r\n\t\t$i = 0;\r\n\t\tforeach($qstrs as $aid)\r\n\t\t{\r\n\t\t\t$i++;\r\n\t\t\t$arcrow = GetOneArchive($aid);\r\n\t\t\t$url = $cfg_domain.$arcrow['arcurl'];\r\n\t\t\t$urls[] = $url;\r\n\t\t\t$artlist .= $url.\"<br \/>\";\r\n\t\t}\r\n\t\tif($i>1) $artlist = \"\";\r\n\t\tif(!empty($urls)){\r\n\t\t\t$ch = curl_init();\r\n\t\t\t$options =  array(\r\n\t\t\t\tCURLOPT_URL => trim($cfg_baidu_push),\r\n\t\t\t\tCURLOPT_POST => true,\r\n\t\t\t\tCURLOPT_RETURNTRANSFER => true,\r\n\t\t\t\tCURLOPT_POSTFIELDS => implode(\"\\n\", $urls),\r\n\t\t\t\tCURLOPT_HTTPHEADER => array('Content-Type: text\/plain'),\r\n\t\t\t);\r\n\t\t\tcurl_setopt_array($ch, $options);\r\n\t\t\t$result = curl_exec($ch);\r\n\t\t\tcurl_close($ch);\r\n\t\t\t$result = json_decode($result, true);\r\n\t\t\tif(isset($result['success'])){\r\n\t\t\t\t$not_same_site = isset($result['not_same_site'][0]) ? \" <font style='color:#f00;'>\u63a8\u9001\u94fe\u63a5\u4e0e\u767e\u5ea6\u7ed1\u5b9a\u7ad9\u70b9\u4e0d\u4e00\u81f4<\/font> \" : \"\";\r\n\t\t\t\t$not_valid = isset($result['not_valid'][0]) ? \" <font style='color:#f00;'>\u63a8\u9001\u94fe\u63a5\u4e0d\u5408\u6cd5<\/font> \" : \"\";\r\n\t\t\t\treturn $not_same_site . $not_valid . '\u767e\u5ea6\u4e3b\u52a8\u63a8\u9001\u6210\u529f '.$result['success'].' \u6761\uff01\u5f53\u5929\u5269\u4f59 '.$result['remain'].' \u6761\u53ef\u63a8\u9001\uff01'.$artlist;\r\n\t\t\t}else{\r\n\t\t\t\treturn '\u767e\u5ea6\u4e3b\u52a8\u63a8\u9001\u5931\u8d25\uff0c\u9519\u8bef\u7801\uff1a'.$result['error'].'<a href=\"https:\/\/ziyuan.baidu.com\/college\/courseinfo?id=267&page=2#h2_article_title12\" target=\"_blank\">\u8be6\u60c5<\/a>';\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\u6ca1\u6709\u6570\u636e\u88ab\u63a8\u9001\uff01\";\r\n\t}\r\n}<\/code><\/pre>\n

\u6253\u5f00\u540e\u53f0\/dede\/article_add.php\u641c\u7d22<\/p>\n

\/\/\u8fd4\u56de\u6210\u529f\u4fe1\u606f<\/code><\/pre>\n

\u5728\u5b83\u4e0a\u9762\u52a0\u5165<\/p>\n

if(!empty($cfg_baidu_push))\r\n{\r\n\t$backurl .= \"<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\".baidu_push($arcID).\"<\/p>\";\r\n}<\/code><\/pre>\n

\u7ee7\u7eed\u641c\u7d22<\/p>\n

line-height:36px;height:36px<\/code><\/pre>\n

\u4fee\u6539\u4e3a<\/p>\n

line-height<\/span>:36px<\/span>;<\/pre>\n

\u6b64\u6559\u7a0b\u4e3a\u6587\u7ae0\u6a21\u6a21\u578b\u7684\u63a8\u9001\uff0c\u5982\u4f60\u6709\u8f6f\u4ef6\uff0c\u56fe\u96c6\u6a21\u578b\u6216\u8005\u5176\u4ed6\u6a21\u578b\uff0c\u8bf7\u53c2\u7167\u4e0a\u9762\u5185\u5bb9\u81ea\u884c\u4fee\u6539\u76f8\u5e94\u6a21\u578b\u6dfb\u52a0\u5185\u5bb9\u3002<\/p>\n

\u65b9\u6cd5\u4e8c\u6548\u679c<\/p>\n

\"\"<\/a><\/p>\n

\u5b8c\u6bd5\uff01<\/p>\n

\u8fd8\u6709\u4e00\u4e2a\u63d2\u4ef6\u662f\u4e0d\u5149\u53ef\u4ee5\u63a8\u9001\u5230\u767e\u5ea6\uff0c\u8fd8\u53ef\u4ee5\u63a8\u9001\u5230\u795e\u9a6c\uff0c\u4e0d\u8fc7\u662f\u6536\u8d39\u63d2\u4ef6\uff0c\u8be6\u7ec6\u4ecb\u7ecd\u67e5\u770b\u4e0b\u9762\u9875\u9762\uff01<\/p>\n

\u7ec7\u68a6\u6279\u91cf\u5411\u767e\u5ea6\u53ca\u795e\u9a6c\u641c\u7d22\u5f15\u64ce\u81ea\u52a8\u6279\u91cf\u63a8\u9001\u6587\u7ae0\u63d2\u4ef6<\/a><\/p>\n

 <\/p>\n

 <\/p>\n","protected":false},"excerpt":{"rendered":"

\u7ec7\u68a6\u767e\u5ea6\u4e3b\u52a8\u63a8\u9001\u65b9\u6cd5\u4e00 \u6253\u5f00\/dede\/article_add.php,\u641c\u7d22 ClearMyAddon($ar […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[43,754,753,222],"class_list":["post-1492","post","type-post","status-publish","format-standard","hentry","category-web","tag-dedecms","tag-754","tag-753","tag-222"],"_links":{"self":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/1492","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/comments?post=1492"}],"version-history":[{"count":0,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/1492\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/media?parent=1492"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/categories?post=1492"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/tags?post=1492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}