"Is there such a function?"
No.
Only the FTP protocol supports things like filesizes. HTTP requires that you download the entire file and just see how much you get.
"correct?"
In memory, yes, it's not on disk untill you save it.
"without first making a (temp.) copy of it on my server's hd? Thank you for your help."
Nope, you can't get pixels from images you don't have🙂 just like you can't look at an image without having it in memory.