if i use curl via php to get just header of a url. it's cost to get all content of response bandwidth for my request? or just as lenght of header i get. my code is something like these:
<?php
$url='http://www.yahoo.com';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_NOBODY, true);
$buffer = curl_exec($ch);
$curl_info = curl_getinfo($ch);
curl_close($ch);
$header_size = $curl_info[header_size];
$header = substr($buffer, 0, $header_size);
echo $header;