PHP头条
热点:

php取得百度最新事件


php 获得百度最新事件
function getBaiduHotKeyWord() 
   { 
    $templateRss = file_get_contents('http://top.baidu.com/rss_xml.php?p=shijian'); 
    If (preg_match('/(.*)<\/table>/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 (!empty ($temp->td->a)) { 
      $keyArray [] = trim(($temp->td->a)); 
    } 
   } 
   return $keyArray; 
   } 

www.phpzy.comtrue/phprm/36785.htmlTechArticlephp取得百度最新事件 php 获得百度最新事件 function getBaiduHotKeyWord() { $templateRss = file_get_contents('http://top.baidu.com/rss_xml.php?p=shijian'); If (preg_match('/ (.*) /is', $templateRss, $_description)) { $templateR...

相关文章

PHP之友评论

今天推荐