网盘php资料,怎么搜索百度网盘里的资料(php版)
生活随笔
收集整理的這篇文章主要介紹了
网盘php资料,怎么搜索百度网盘里的资料(php版)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
現在很多人將資料共享到百度網盤里,但是用百度搜索的時候,是很難直接搜索到的,但是懂搜素引擎的人都知道,在搜索框中輸入:site:pan.baidu.com 關鍵字,就可以搜索到百度網盤里的與關鍵字相關的資料,但是很多小白用戶,不是很了解,所以想寫個搜索網盤資料的網站或者軟件,代碼很簡單,供大家參考
header("Content-Type: text/html; charset=utf-8");
require_once "simple_html_dom.php";
/*
* $word:關鍵字
* $n :顯示結果的條數
*
*/
function find($word,$n)
{
$qurl='http://www.baidu.com/s?wd=site%3Apan.baidu.com%20'.$word.'&ie=utf-8';
$html=file_get_html($qurl);
$first=$html->find('.result',0);
for($i=0;$i
{
$content.=$first->innertext.'
';
$first=$first->next_sibling();
}
echo $content;
$html->clear();
}
find("蒼井空",3);
?>
總結
以上是生活随笔為你收集整理的网盘php资料,怎么搜索百度网盘里的资料(php版)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: windows10会中php病毒吗,wi
- 下一篇: java readunsignedint