日期:2014-05-17 浏览次数:20468 次
$s=file_get_contents('http://www.weather.com.cn/weather/101070101.shtml');
preg_match('/<h1 class="weatheH1" id="live">\s+(.+)\s+<\!--today5-->/s',$s,$m);
echo $m[1];
preg_match('/<div class="weatherYubao" id="7d">\s+<h1 class="weatheH1">\s+(.+?)\s+<span>/s',$s,$m);
echo $m[1];