怎样把http://www.rbs.org.cn/templates/T_new_list2/index3.aspx?nodeid=10&page=ContentPage&contentid=1820这个网页上专家的任何信息采集下来,
我写了这样的代码:
  <?php
set_time_limit(0);
header('content-type:text/html;charset=utf-8');
$link=mysql_connect('localhost','root','');
mysql_select_db('cj');
mysql_query('set names utf8');
for($t=1820;$t<=1822;$t++)
{
$html=file_get_contents("http://www.rbs.org.cn/templates/T_new_list2/index3.aspx?nodeid=10&page=ContentPage&contentid=".$t);
//echo $html;preg_match_all('/<dl class="add_dl">
(.*)\\/dl>/isU',$html,$tmp1);//专家姓名
preg_match_all('/<div class="add_auto">
(.*)\\/div>/isU',$html,$tmp2);//个人简历
preg_match_all('/<div class="add_auto" style="display:none">
(.*)\\/div>/isU',$html,$tmp3);//研究成果
$sql="INSERT INTO company (newid,a,b,c,d,e,f,g,h,i,j,k,l) VALUES(
'".$t."',
'".str_replace('<dl class="add_dl">',"",str_replace("</dl>","",$tmp1[0][0]))."',
'".str_replace('<div class="add_auto">',"",str_replace("</div>","",$tmp2[0][0]))."',
'".str_replace('<div class="add_auto" style="display:none">',"",str_replace("</div>","",$tmp3[0][0]))."',
)";
//print_r($tmp1);
}
?>

但是写入不到数据库了。请教帮帮我。