I'm using the following to check if a file exists:
$file = @file_get_contents("$url", 'r');
if ($file)
{}
However when the file doesn't exist the scrippt just stops working instead of going to the else that is not shown here.
What is wrong with this?