{"id":1453,"date":"2015-04-27T10:38:53","date_gmt":"2015-04-27T02:38:53","guid":{"rendered":"http:\/\/www.youthtribe.com\/?p=1453"},"modified":"2015-04-27T10:51:43","modified_gmt":"2015-04-27T02:51:43","slug":"php-%e9%87%87%e9%9b%86%e7%99%be%e5%ba%a6%e5%9c%b0%e5%9b%be%e6%95%b0%e6%8d%ae%e6%97%b6%e9%81%87%e5%88%b0%e7%9a%84%e5%a5%87%e6%80%aa%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/www.youthtribe.com\/archives\/1453","title":{"rendered":"php \u91c7\u96c6\u767e\u5ea6\u5730\u56fe\u6570\u636e\u65f6\u9047\u5230\u7684\u5947\u602a\u95ee\u9898"},"content":{"rendered":"
\u5982\u679c\u7528\u6d4f\u89c8\u5668\u8bbf\u95ee\u4e00\u4e2a\u7f51\u5740\uff1a
\nhttp:\/\/map.baidu.com\/?newmap=1&reqflag=pcmap&biz=1&pcevaname=pc2&da_par=direct&from=webmap&qt=s&from=webmap&c=187&pl_data_type=cater&pl_sub_type=&pl_price_section=0%2C%2B&pl_sort_type=data_type&pl_sort_rule=0&pl_discount2_section=0%2C%2B&pl_groupon_section=0%2C%2B&pl_cater_book_pc_section=0%2C%2B&pl_ticket_book_flag_section=0%2C%2B&pl_movie_book_section=0%2C%2B&pl_business_type=cater&pl_business_id=&pl_activity_gwj_section=0%2C%2B&wd=%E9%85%92%E5%90%A7&pn=3&db=0&wd2=&sug=0&da_src=pcmappg.poi.page&on_gel=1&src=7&gr=3&b=(12583968.24,2545864.04;12616096.24,2573032.04)&l=13&addr=0&nn=30&tn=B_NORMAL_MAP&ie=utf-8&t=1430101051225<\/p>\n
\u5219\u6570\u636e\u663e\u793a\u6b63\u5e38\u3002\u3002\u3002
\n\u4f46\u662f\u5982\u679c\u7528php\u4ee3\u7801\u53bb\u83b7\u53d6\u8fd4\u56de\u7684json\u6570\u636e\uff0c\u6570\u636e\u5c31\u4e0d\u5bf9\u4e86\uff0c\u6bd4\u5982\u6211\u4eec\u53ea\u5173\u6ce8addr\u8fd9\u4e2a\u503c\uff0c\u4f1a\u53d1\u73b0\u5927\u591a\u6570\u662f\u7a7a\u7684\uff08\u5176\u4ed6\u503c\u4e5f\u662f\u9519\u4e71\uff09
\nphp code<\/p>\n
\r\n\t\t$url = 'http:\/\/map.baidu.com\/?newmap=1&reqflag=pcmap&biz=1&pcevaname=pc2&da_par=direct&from=webmap&qt=s&from=webmap&c=187&pl_data_type=cater&pl_sub_type=&pl_price_section=0%2C%2B&pl_sort_type=data_type&pl_sort_rule=0&pl_discount2_section=0%2C%2B&pl_groupon_section=0%2C%2B&pl_cater_book_pc_section=0%2C%2B&pl_ticket_book_flag_section=0%2C%2B&pl_movie_book_section=0%2C%2B&pl_business_type=cater&pl_business_id=&pl_activity_gwj_section=0%2C%2B&wd=%E9%85%92%E5%90%A7&pn=3&db=0&wd2=&sug=0&da_src=pcmappg.poi.page&on_gel=1&src=7&gr=3&b=(12583968.24,2545864.04;12616096.24,2573032.04)&l=13&addr=0&nn=30&tn=B_NORMAL_MAP&ie=utf-8&t=1430101051225';\r\n\t\t$json = file_get_contents($url);\r\n\t\t$data = json_decode($json);\r\n\t\t\/\/echo $count;\r\n\t\tvar_dump($data);\r\n<\/pre>\n\u8fd9\u662f\u4e3a\u4ec0\u4e48\uff1f<\/p>\n
\u66f4\u5947\u602a\u7684\u662f\uff0c\u521a\u5f00\u59cb\u91c7\u96c6\u65f6\uff0c\u662f\u53ef\u4ee5\u7684\uff0c\u91c7\u96c6\u7740\u91c7\u96c6\u7740\u5c31\u4e0d\u884c\u4e86\u3002\u3002\u3002<\/p>\n
\u6240\u4ee5\u6211\u7684\u95ee\u9898\u662f\uff1a\u8fd9\u4e2afile_get_content\u548c\u76f4\u63a5\u8bbf\u95ee\uff0c\u5bf9\u670d\u52a1\u7aef\u6765\u8bf4\u6709\u4ec0\u4e48\u533a\u522b\uff1f\u670d\u52a1\u7aef\u9760\u4ec0\u4e48\u533a\u522b\u7684\uff1f\uff1f<\/p>\n","protected":false},"excerpt":{"rendered":"
\u5982\u679c\u7528\u6d4f\u89c8\u5668\u8bbf\u95ee\u4e00\u4e2a\u7f51\u5740\uff1a http:\/\/map.baidu.com\/?newmap=1&reqflag=pcmap&biz=1&pcevaname=pc2&da_par=direct&from=webmap&qt=s&from=webmap&c=187&pl_data_type=cater&pl_sub_type=&pl_price_section=0%2C%2B&pl_sort_type=data_type&pl_sort_rule=0&pl_disc<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,224,9],"tags":[],"_links":{"self":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/1453"}],"collection":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/comments?post=1453"}],"version-history":[{"count":2,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/1453\/revisions"}],"predecessor-version":[{"id":1455,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/1453\/revisions\/1455"}],"wp:attachment":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/media?parent=1453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/categories?post=1453"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/tags?post=1453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}