The "stat" based functions (filesize, file_exists, is_file, filemtime, etc) don't work with URLs in PHP 4.
You'll need to open the URL with [man]fopen[/man] then read it with [man]fread[/man], counting bytes as you go.
Upgrading to PHP 5 (when it is released, or one of the PHP 5 release candidates which are out now) may allow you to use filesize on URLs (I haven't tried it).