在链接中找到所有src图像 [英] find all src of images in link

查看:84
本文介绍了在链接中找到所有src图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在以下链接中找到所有src图像





i need to find all src images in the following link


$url='http://www.firstcovers.com/tags/2/covers.html?infinity';

$pattern = '#src="([^"]+/temp/temp[a-z0-9]{13}\.jpeg)"#';
preg_match_all($pattern, $url, $out);
echo '<pre>';
print_r($out);







输出给我一个空数组的问题是有没有办法在使用php获取给定链接中所有图像的src?




the output give me a null array the question is is there any way to get src of all images in the given link using php ?

推荐答案

url ='http://www.firstcovers.com/tags/2/covers.html?infinity';
url='http://www.firstcovers.com/tags/2/covers.html?infinity';


pattern ='#ss =([^] + /温度/温度[A-Z0-9] {13} \.jpeg)#;
preg_match_all(
pattern = '#src="([^"]+/temp/temp[a-z0-9]{13}\.jpeg)"#'; preg_match_all(


pattern,


这篇关于在链接中找到所有src图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆