Welcome Guest, Not a member yet? Register   Sign In
How to check if file exists via URL
#3

[eluser]Pygon[/eluser]
Code:
if( fopen('$file','r') )
{
//exists
}

This would cover a simple version or whether you get a response on the URL.

The reason that many of these functions seem "heavy", I would assume, is because they attempt to determine whether the file is real or simply a custom 404 error page (most likely via socket >> request >> mime type comparison).


Messages In This Thread
How to check if file exists via URL - by El Forum - 10-30-2007, 09:45 PM
How to check if file exists via URL - by El Forum - 10-31-2007, 06:19 AM
How to check if file exists via URL - by El Forum - 10-31-2007, 07:59 AM
How to check if file exists via URL - by El Forum - 10-31-2007, 08:06 AM
How to check if file exists via URL - by El Forum - 10-31-2007, 08:11 AM
How to check if file exists via URL - by El Forum - 10-31-2007, 08:19 AM
How to check if file exists via URL - by El Forum - 10-31-2007, 02:01 PM
How to check if file exists via URL - by El Forum - 06-21-2010, 01:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB