Example for getting remote file stats.
Best way i found was to open the url into $data and make a temporary file with the contents of $data then get the fstats on the temporary file :).
$url="http://www.testurl.com";
$fp=fopen($url,"r");
$data=fread($fp,"1000000");
fclose($fp);
$test_file="./temp_file.txt";
$fp_test=fopen($test_file,"w+");
$fp_write=fputs($fp_test,$data);
fclose($fp_test);
$stat_file='./temp_file.txt';
$test_fp=fopen($stat_file,"r");
$stats=fstat($test_fp);
fclose($test_fp);
print_r($stats);
Seems to work fine for me, If there is a quicker way i havn't found it yet.
fseek