Fortunately that's not possible. Functions like filesize()
will only handle files on the local filesystem for obvious reasons.
If you could access the physical filesize of a remote file you could also processes other operations (like reading the plain file) to a remote file which would not be very secure, would it?
However, if you have physical access to the remote server, there would be no problem to connect to it with PHP.
PHP provides functionionality to connect to remote servers using SSH. It's also pretty easy (but not necessarily handy) to work with it.
Further reading:
If, for whatever reasons, you can't SSH into your server, but have a FTP-Server installed, PHP provides an interface for working with the file transfer protocol.
Further reading:
I'm sure that if you wanted to, you could find another bunch of possibilities to connect to the remote server. I've chosen SSH and FTP since they are pretty common and even the most shared-hosting packages do provide access through them.
Please note: Connecting to remote servers just to grab the filesize of a file is pretty much an overkill. Make sure that the advantages overcome the downsides of it.
@thedom provided a good example of how to provide an interface to work with files on your remote server without connecting to it via SSH or FTP.