【发布时间】:2012-10-17 18:56:39
【问题描述】:
可能重复:
php get all the images from url which width and height >=200 more quicker
我正在编写一个 PHP 脚本来从 URL 中获取图像。但我只想显示超过一定尺寸/或[长度/宽度]的图像。我试过getimagesize(),但速度很慢,尤其是多张图片。
我阅读了有关使用 cURL 的信息。但不确定,当输入是 url 字符串时,如何获取图像的文件大小或尺寸。 我阅读了这些以及更多内容。
http://forums.phpfreaks.com/topic/232507-faster-solution-to-check-image/
Output external image with cURL, but how do you change the width of the image?
Get image dimensions with Curl
希望获得帮助,以获取图像大小/尺寸。
【问题讨论】:
-
@Baba 谢谢,让我试试看。
-
@Baba 你知道吗,为什么脚本会在www1.macys.com/shop/mens-clothing/…等一些url上崩溃