php获取文章图片列表

直接看代码把:

$pattern = '#<img(.+?)src\s*=\s*[\"|\']([^"|^\']+?)[\"|\']([^>]*?)>#'; preg_match_all($pattern, $content, $match); $url_list = $match[2];$url_list = array_unique($url_list); // 图片去重

 

本文作者:潘潘潘的博客

本文链接:https://www.cnblogs.com/seanpan/p/16869212.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   潘潘潘的博客  阅读(17)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
💬
评论
📌
收藏
💗
关注
👍
推荐
🚀
回顶
收起
  1. 1 404 not found REOL
404 not found - REOL
00:00 / 00:00
An audio error has occurred.