Remote is_file for PHP < 5.5.0

I know it’s been a long time since posting, and there are various reasons, one of which was that length of time it took to create a long post, so I’m changing up the format a bit with these kinda shorter posts as I come¬†across¬†them, hopefully be getting directly to the point I’ll be able to make the time to get them done. Anyways, to the posting.

If your programming on a newer version of PHP, say 5.5.0 or newer you may have become rather dependent on the ability for various things like get_file_contents and is_file to use various wrappers to do there thing. I know that it’s been a huge time saver for me, but what do you do if your then forced back to an over, pre 5.5.0 version of PHP and want to check for that remote file? Simple.

It’s as simple as that. All this function does it use curl to check the HTTP code at the supplied url and returns true or false accordingly.

Leave a Reply

Your email address will not be published. Required fields are marked *