I Was Using This Code to Get Image size in php and it was working Perfectly For Me.
$img = get_headers("http://ultoo.com/img_single.php", 1);
$size = $img["Content-Length"];
echo $size;
But How Get this through CURL ? I Tried This But Doesn't Work.
$url = 'http://ultoo.com/img_single.php';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, "Content-Length" );
//curl_setopt($ch, CURLOPT_NOBODY, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
$filesize = $result["Content-Length"];
curl_close($ch);
echo $filesize;