How to see if remote images or pages are available using PHP.

I recently used this little function in a website that I am developing that sourced at lot of remote images. I needed a way to see if the image was available, code 200, or not. This can also be used for whole pages or other resources pulled via http.

Tagged with: ,