check if file exists in php

if (!file_exists('http://example.com/images/thumbnail_1286954822.jpg')) {   
$filefound = '0';
}

  1. The function expects a string.

  2. file_exists() does not work properly with HTTP URLs.