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

  1. 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.
  2. you can check image existence before displaying them users. example while adding them website. once, store results in database, , display images know exist.
  3. 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.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -