呵呵^
做过拉取中央气象台的

解决方案 »

  1.   

    <?php 
    $url="http://weather.news.sohu.com/city_inc.php?city=北京"; 
    $handle = fopen ("$url", "rb"); 
    $contents = ""; 
    do { 
    $data = fread($handle,18192); 
    if (strlen($data) == 0)break; 
    $contents .= $data; 
    } while(true); 
    fclose ($handle); $contents=strstr($contents,"今日天气"); 
    $contents=strstr($contents,"<td class=blu01>");
    $end=strpos($contents,"</tr>"); 
    $contents=substr($contents,0,$end); 
    $contents=ereg_replace("<td class=blu01>","",$contents);  
    echo $contents;
    ?>
    sohu的~~