首頁  >  文章  >  後端開發  >  2009nba總決賽資料 php 取得百度的熱詞資料的程式碼

2009nba總決賽資料 php 取得百度的熱詞資料的程式碼

WBOY
WBOY原創
2016-07-29 08:48:011003瀏覽

複製程式碼 程式碼如下:


/**
* 取得百度的熱詞
* @user 小傑
* @from http://www.isharey.com/?p=354
* @return array 回傳百度的熱詞資料(數組回傳)
*/
function getBaiduHotKeyWord()
{
function getBaiduHotKeyWord()
{
function getBaiduHotKeyWord()
{
temp_plates.com .php?p=top10');
If (preg_match('/

(.*)
/is', $templateRss, $_description)) {
$templateRss = $_description [0];
$templateRss = str_replace("&", "&", $templateRss);
}
$templateRss = "" . $templateRss;
$xml = simplexml_load_?>" . $templateRss);
foreach ($xml->tbody->tr as $temp) {
if (!empty ($temp->td->a)) {
$keyArray [] = trim(($temp-> td->a));
}
} return $keyArray;

}

print_r(getBaiduHotKeyWord());

🎜 以上就介紹了2009nba總決賽數據 php 獲取百度的熱詞數據的代碼,包括了2009nba總決賽數據方面的內容,希望對PHP教程有興趣的朋友有所幫助。 🎜 🎜 🎜
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn