title: PHP filesize for absolute path
body: <p>I was surprised PHP's <a href="http://php.net/manual/en/function.filesize.php" rel="nofollow">filesize()</a> fails on absolute paths??
  My files are on my own server, how can I get the filesize except from converting them to relative (a mess)</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>example:</p>
  
  <pre><code>$filename = 'http://172.16.xx.x/app/albums/002140/tn/020.jpg';
  echo $filename . ': ' . filesize($filename) . ' bytes';
  
  Warning: filesize() [function.filesize]: stat failed for http://172.16.xx.x/app/albums/002140/tn/020.jpg in /Applications/XAMPP/xamppfiles/htdocs/app/admin/+tests/filesize.php on line 26
  </code></pre>
  
  <p><strong>END EDIT</strong></p>
  
  <p>I found this example for remote files:</p>
  
  <pre><code>$filename = 'http://www.google.com/logos/2010/stevenson10-hp.jpg';
  $headers = get_headers($filename, 1);
  echo $headers['Content-Length']; // size in bytes
  </code></pre>
  
  <p>Does this work without downloading the files?</p>