I have a PHP site that allows a user to search for and display images. Images come from a variety of sources and as such, some are blocked by a web filtering service.
Site is aimed at multiple users that will like have different web filtering servicew.
How can I determine if the image is displayed or not?
Have tired getimagesize()
, get_headers()
, file_exists()
with no luck . These functions report the image details correctly (I get a 200 OK response etc.), however the webfiltering then blocks the image from being shown.
My current process is cURL
the image search request (using Google's image search API), json decode the results and then display images with their remote URL as the src.
I could save all the images to my server for each search request, but that seems too bandwidth intensive.