您好,欢迎访问一九零五行业门户网

PHP获取百度最新事件

php获取百度最新事件,如下代码:
function getbaiduhotkeyword()    {        $templaterss = file_get_contents('http://top.baidu.com/rss_xml.php?p=shijian');        if (preg_match('/(.*)/is', $templaterss, $_description)) {        $templaterss = $_description[0];        $templaterss = str_replace(&, &, $templaterss);        }       $templaterss = .trim($templaterss);       $xml = simplexml_load_string($templaterss);       foreach ($xml->tbody->tr as $temp) {        if (!emptyempty ($temp->td->a)) {          $keyarray [] = trim(($temp->td->a));        }       }       return $keyarray;     }

其它类似信息

推荐信息