http://ent.qq.com/a/20111028/000067.htm
比如说这条新闻有两张,读取地址。怎么做啊、。

解决方案 »

  1.   

    $con=file_get_contents('http://ent.qq.com/a/20111028/000067.htm')
    再用正则匹配
      

  2.   

    preg_match_all('/<img(.*?)src="(.*?)(?=")/', file_get_contents('http://ent.qq.com/a/20111028/000067.htm'), $img_tags);
      

  3.   

    楼上的兄弟,我按照您的方法做了 还是没有效果啊。都是空的
    这个是要处理的字符:
    <p><img height=\"603\" width=\"450\" alt=\"\" src=\"/esgyfdc/house/upload/20101228042859521(1).jpg\" /></p>
    <p>asdhas d as da按时到俺是的撒谎发是</p>
    <p><img height=\"137\" width=\"99\" alt=\"\" src=\"/esgyfdc/house/upload/thumb_100_137_20101228042616897.jpg\" /></p>
    <p>撒娇的俺是发生飞 </p>
    <p><img height=\"137\" width=\"93\" alt=\"\" src=\"/esgyfdc/house/upload/thumb_100_137_20101228044343561.jpg\" /></p>
    截取后的:
    Array
    (
        [0] => Array
            (
            )    [1] => Array
            (
            )    [2] => Array
            (
            ))