时间:2021-07-01 10:21:17 帮助过:23人阅读
百度百科是一部内容开放、自由的网络百科全书,旨在创造一个涵盖所有领域知识、服务所有互联网用户的中文知识性百科全书。百度百科以平等、协作、分享、自由的互联网精神,提倡网络面前人人平等,所有人共同协作编写百科全书,让知识在一定的技术规则和文化脉络下得以不断组合和拓展。
百度百科
为用户提供一个创造性的网络平台,强调用户的参与和奉献精神,充分调动互联网所有用户的力量,汇聚上亿用户的头脑智慧,积极交流和分享,同时实现与搜索引擎的完美结合,从各个不同层次上满足用户对信息的需求。 百度百科所提供的,是一个互联网所有用户均能平等地浏览、创造、完善内容的平台。所有中文互联网用户在百度百科都能找到自己想要的全面、准确、客观的定义性信息
从百度百科抓取内容
输出 http://baike.baidu.com/view/1466380.htm
getEncyclopediaInfo( = ('utf-8', 'gbk', );
= ();
= 'http://baike.baidu.com/list-php/dispose/searchword.php?word=' .. '&pic=1' = httpGetRequest_baike();
= ('gbk', 'utf-8', );
("/URL=(\S+)'>/s", , );
= 'http://baike.baidu.com' .[1 = httpGetRequest_baike();
('#"Description"\scontent="(.+?)"\s\/\>#is', , (([1]) && [1] != "" [1 "抱歉,没有找到与“".."”相关的百科结果。" httpGetRequest_baike( = "User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20100101 Firefox/14.0.1",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Language: en-us,en;q=0.5",
"Referer: http://www.baidu.com/" =, CURLOPT_URL, , CURLOPT_RETURNTRANSFER, 1, CURLOPT_HTTPHEADER, = curl_exec( ( === "cURL Error: ". curl_error( ?>
微信中调用
("TOKEN", "weixin" = -> = ["echostr"
(-> = ["signature" = ["timestamp" = ["nonce" = = (, , ( = ( = ( ( ==
= ["HTTP_RAW_POST_DATA""R ".
(!( = (, 'SimpleXMLElement', = (-> ( "text":
= ->receiveText( "event":
= ->receiveEvent(:
= "unknow msg type: "."T ". "" receiveText( = 0 = (-> = "" = ""('baike.php' = getEncyclopediaInfo( = ->transmitText(, , receiveEvent( = "" (-> "subscribe":
= "欢迎关注" = ->transmitText(, transmitText(, , = 0 = "
%s
%d
" = (, ->FromUserName, ->ToUserName, (), , logger(?>
欢迎关注方倍工作室微信,体验我们开发的功能及了解行业的最新动态
http://www.bkjia.com/PHPjc/440099.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/440099.htmlTechArticle微信公众平台开发 微信公众平台开发模式 企业微信公众平台百度百科 作者: 方倍工作室 地址:http://www.cnblogs.com/txw1958/p/weixin67-baike.html...