[edit]What follows is pretty much the same as what jpmoriarty said.[/edit]
The fread() call will read "up to" the number of bytes you have specified, but there is no guarantee that it will read that many, even if the data exists. This is especially true of network streams. Bottom line is, you need to use a while loop.
Where you have this:
$read = fread($open,$fsize);
Change it to this:
$read = '';
while (!feof($open)) {
$read .= fread($open, 1024);
}
Also, you may want to change the "r" in the fopen call to "rb".