In my script, I'm checking to see if a file exists and if it does I display a link to the file. Now this works all well and good until I have a file on another box. The file_exists function doesn't work with URLs like http://10.33.1.1/IVR/123.wav
What I'm doing now is
if (@fopen($url, "r")) {
# more code here
}
I'm wondering if there is a better way that doesn't use the @ to suppress the error message when a file doesn't exist? Really even if it isn't "better" but doesn't use the @ to suppress the error messages, I'd rather use it as our coding standards strongly oppose the use of @ in PHP.
Thanks