<?

$id = $_REQUEST["tid"]+0; 

$sUrl="http://weather.news.qq.com/inc/ss".$id.".htm";

$srcStr=file_get_contents($sUrl);

if(!$srcStr) die('Error!');

$cityn = cut("rb12\">","</td>",$srcStr);

$citym = cut("r_tembg5.gif\" align=\"center\">","</td>",$srcStr);

$cityt = nl2br(cut("/images/tem1.gif\" width=\"57\" height=\"13\"></td>","</tr>",$srcStr));

$cityt = cut("center\">","<br />",$cityt);

function cut($start,$end,$file){ 

        $message=explode($start,$file); 

        $message=explode($end,$message[1]); 

return        $message[0]; 

} 

echo "var __minisite__weather__ = '".$cityn." ".$cityt." ".$citym."';";

?>

