Question: I uploaded some files to a folder, and when I use filesize function I get this message:

```
Message: filesize() [function.filesize]: stat failed for http://www.books.tahasoft.com/216.ppt

```

the path of file is: 

```
http://www.books.tahasoft.com/216.ppt

```

and here is my code:

```
<?
echo filesize("http://www.books.tahasoft.com/216.ppt");
?>

```

How can I fix this?

Answer: 
You could do this instead.

```
echo strlen(file_get_contents("http://www.books.tahasoft.com/216.ppt"));

```
The best you can do, to perform a HTTP [HEAD](http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods) request to the file, and check existence of the `Content-Length` header; the only other way would be to *download* the whole file, and check its length - but in my opinion is not a real option.