可能重複:
php get all the images from url which width and height >=200 more quickerPHP獲取圖像的寬度/長度與捲曲? [無和getimagesize()]
我寫一個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謝謝,讓我試試看。 – aVC
@Baba你知道嗎,爲什麼腳本崩潰在一些網址上,如http://www1.macys.com/shop/mens-clothing/mens-athletic-wear?id=59165&edge=hybrid&cm_sp=us_men%27s-men% 27s-apparel-activewear -_- t-shirt#!fn = APPAREL_TYPE%3DT-Shirts%26sortBy%3DORIGINAL%26productsPerPage%3D40&!qvp = iqvp – aVC