$html = '<img id="12" border="0" src="/images/image.jpg"
alt="Image" width="100" height="100" />';
$doc = new DOMDocument();
$doc->loadHTML($html);
$xpath = new DOMXPath($doc);
$src = $xpath->evaluate("string(//img/@src)"); # "/images/image.jpg"
http://stackoverflow.com/questions/10130858/get-img-src-with-php
stackoverflow 上获取图片地址 非正则
最新推荐文章于 2023-05-30 20:59:41 发布