日期:2014-05-17  浏览次数:20599 次

PHP采集程序问题

   <td id="prodImageCell" height="280" width="280"><a href="http://www.amazon.co.jp/gp/product/images/B007HDJPOU/ref=dp_image_0/375-3424220-7267256?ie=UTF8&n=3828871&s=kitchen" target="AmazonHelp" onclick="return amz_js_PopWin(this.href,'AmazonHelp','width=700,height=600,resizable=1,scrollbars=1,toolbar=1,status=1');"  ><img onload="if (typeof uet == 'function') { if(typeof setCSMReq=='function'){setCSMReq('af');setCSMReq('cf');}else{uet('af');uet('cf');amznJQ.completedStage('amznJQ.AboveTheFold');} } " src="http://ec2.images-amazon.com/images/I/418Qdk6bctL._SL500_AA280_.jpg" id="prodImage"  width="280" height="280" border="0" alt="FJK 蜆?ル蜒吝?荵?maxell荵?蛯?蜆門ョ蜆募с蜒槫?謠?謚? LR1130荵?10螻??荵?" onmouseover="" /></a>



  <td id="prodImageCell" height="280" width="280"><a href="http://www.amazon.co.jp/gp/product/images/B005318B0C/ref=dp_image_0/376-2257022-2490017?ie=UTF8&n=13299531&s=toys" target="AmazonHelp" onclick="return amz_js_PopWin(this.href,'AmazonHelp','width=700,height=600,resizable=1,scrollbars=1,toolbar=1,status=1');"  ><img onload="if (typeof uet == 'function') { if(typeof setCSMReq=='function'){setCSMReq('af');setCSMReq('cf');}else{uet('af');uet('cf');amznJQ.completedStage('amznJQ.AboveTheFold');} } " src="http://ec2.images-amazon.com/images/I/51bsLAswKVL._SL500_AA280_.jpg" id="prodImage"  width="280" height="280" border="0" alt="PSP2000丒PSP3000梡 僶僢僥儕乕僇僶乕1000僒僀僘懳墳 僺傾僲僽儔僢僋-543547" onmouseover="" /></a>



这两段是我采集过来的,采集两个产品页面,我就想要产品图片的地址
http://ec2.images-amazon.com/images/I/418Qdk6bctL._SL500_AA280_.jpg
http://ec2.images-amazon.com/images/I/51bsLAswKVL._SL500_AA280_.jpg

整个页面的代码很多,我就是想要这个图片
http://ec2.images-amazon.com/images/I/
._SL500_AA280_.jpg
以上两段每个页面都是一样的,请问怎么过滤我想要的这个图片地址

------解决方案--------------------
preg_match_all('#src="(http://ec2\.images-amazon\.com/images/I/[a-z\d]+\._SL500_AA280_\.jpg)"#is',$s,$m);
print_r($m[1]);