/** * 爬虫 * * @param string $url * @return array */ function crawler($url) { $content = _getUrlContent($url); if ($content) { $url_list = _reviseUrl($url, _filterUrl($content)); if ($url_list) { return $url_list; } else { return; } } else { return; } }
</div> </div> </div> <div class="container result"> </div> <!-- <script src="https://a.alipayobjects.com/u/js/201204/2S07Fhc1TN.js"></script> --> <script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script> <script src="../bootstrap/js/bootstrap.min.js"></script> <script type="text/javascript"> $('#header').find('li').eq(4).attr('class','active'); var top10News = <?php echo _getUrlContent('http://weixin.sogou.com/pcindex/pc/web/web.js'); ?> ; //http://g.search1.alicdn.com/pcindex/pc/web/web.js?t=1416880384876&_veri=20121009 var result = $('.result'), topwords = $('.topwords'), hotwords = $('.hotwords'); if (typeof(top10News)=='object') { result.html('<table class="table table-hover"><thead><tr><th width=10%>首图</th><th>标题</th><th>简介</th><th width="15%">微信号</th><th width="10%">时间</th></tr></thead><tbody></tbody></table>'); //topwords for (var i = 0; i < top10News.topwords.length; i++) { var word = top10News.topwords[i].word,