1  如何在框架中得到下面框架中动态得到的外部网页的HTML
在上面的frame里提交的地方写明target是什么
<form action='aaa.php' target='下面frame的名字'>2 如何取出页面中所有target=gongneng 的链接的链接地址?
$string = '<a href="http://www1.5460.net/gy5460/jsp/login/gongneng.jsp?csid=6081498" target=gongneng>中国人民抗日战争纪念</A>aaa<a href="http://www2.5460.net/gy5461/jsp/login/gongneng.jsp?csid=6081498" target=gongneng>中国人民抗日战争纪念</A>bbb<a href="http://www3.5460.net/gy5462/jsp/login/gongneng.jsp?csid=6081498" target=gongneng>中国人民抗日战争纪念</A>';
preg_match_all('/<A href=\"(.*)\".*target=gongneng.*<\/A>/isU', $string, $stringTemp);
for ($i=0; $i<count($stringTemp[1]); $i++){
    echo $stringTemp[1][$i]."<br>";
}

解决方案 »

  1.   

    '逍遥浪子编程
    '网志:http://blog.csdn.net/xiaoyaolz
    '交个朋友,一起编程,学习,一生的朋友
    没有办法,读网页html吧
      

  2.   

    用正则表达式preg_match_all('/<A href="([^"]+)"\s*target=gongneng>/i', $string, $stringTemp);
      

  3.   

    你下面的框架是你的吗?请设置下面的框架名称为:gongneng
      

  4.   

    各位高手,看一下这个帖,给点意见吧:
    http://community.csdn.net/Expert/topic/4338/4338855.xml?temp=.4979364