To get the entire file into a variable, which can then be written out to a file on your local drive, use the PHP file() function. This way you don't have to know the size of the image you are getting (Which, as far as I know, you can't find out anyways...).
Some code might be:
$file = join("",file("$sName"));
// Write $file to a local image
Hope this helps get you started,
-Josh B