Jump to content

[SOLVED] No Image Alternative


briant

Recommended Posts

I have an array of images displayed from off-site urls. Sometimes images are not available and show an image break icon. I know a javascript way to display an alternative image to replace the broken image but that doesn't work well at all. The other way is with php but it takes way to long to load. What is the best way using php to maximize speed?

 

if (strlen (@file_get_contents ($imageurl)) > 900) { print "image works"; } else { print "image does not work"; }

Link to comment
https://forums.phpfreaks.com/topic/153435-solved-no-image-alternative/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.