How to check existence of large number of remote images in php -
i displaying large number of remote images in php webpage , need check if image exists in-order-to handle no image condition. process takes heavy load check condition each remote file. please suggest views handle this.
thanks in advance.
i think there several solutions
- if display remote images (those images not located @ server) on webpage, can check if image exists javascript. mean create image , check if loaded. handle exception javascript.
- you can check image existence before displaying them users. example while adding them website. once, store results in database, , display images know exist.
- there php function curl_multi_exec. allows perform several http requests simultaneously.
you better copy images server. if do, sure images still exist , not modified.