Comments on: How to Check if Remote File Exists using PHP https://www.codexworld.com/how-to/check-if-remote-file-exists-url-php/ Web & Mobile App Development Company Mon, 16 Sep 2024 01:22:58 +0000 hourly 1 By: Fred https://www.codexworld.com/how-to/check-if-remote-file-exists-url-php/comment-page-1/#comment-257586 Mon, 16 Sep 2024 01:22:58 +0000 https://www.codexworld.com/?post_type=how-to-guides&p=3790#comment-257586 Your “check if remote file URL exists” doesn’t work as titled.
It returns 200 if the remote directory path is available but the file itself is non existent.

ie.
I have files located here:
example.com/public_files/file1.zip
example.com/public_files/file2.zip

if I search for a file at: example.com/public_files/file99.zip it returns 200 with your function because the directory path itself exists therefore the function does not work as you describe.

]]>