$CSV = file_get_contents('http://ichart.yahoo.com/table.csv?s=GOOG&a=0&b=1&c=2000&d=0&e=31');
var_dump($CSV);
^ try this one on for size.
You only fread
once. It's only natural you don't get the whole thing. It needs to be read until feof
(). You can't expect TCP/IP to delivery your expected buffer size. You say fread
() a maximum of ##### bytes but you get in return as much as the server wants to (/ can) send in one strike.
PS: To go full awesome, use cURL
! But file_get_contents
should do here.