Try to fetch it? You could use fopen() or cURL functions for this.
If I wanted to do it as efficiently as possible, I might use fsockopen() and issue an HTTP "HEAD" request so that the foreign server does not try to actually send the file.
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
The online manual entry for file_exists() states that the wrapper must support the stat() functionality for file_exists() to work.
The online manual section on supported wrappers [link] says HTTP and HTTPS do not support stat(). So file_exists() is not going to work with an HTTP resource.
Who said it was an HTTP or HTTPS resource. the OP just sated he wanted to check if a particular image file existed. They never stated it was located on another server or that is was accessed form somwhere else.
I assumed the file was supposed to be located in the same file system , hence file_exists should work.
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
I'm not saying you disagree, just pointing out that it should work given the right circumstances.
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.