I havent tried it doing it with drupal but try passing method = HEAD.<div><br></div><div>HEAD /index.html </div><div><br></div><div>would fetch only headers of that resource, where as GET for instance would also return the content.</div>
<div><br></div><div>Cheers</div><div>dipen </div><div><br></div><div><br>
<br><br><div class="gmail_quote">On Sun, Dec 6, 2009 at 7:52 PM, nitin gupta <span dir="ltr">&lt;<a href="mailto:nitingupta.iitg@gmail.com">nitingupta.iitg@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br><br>I am currently using curl (CURLOPT_NOBODY) to exclude the body and to just get the headers returned by the sever for a http request. I am specifically interested in the return status code and the content length. Can I do it using drupal_http_request? What will be the suitable value for the $headers, so that I don&#39;t need to download the whole page?<br>


<br><a href="http://api.drupal.org/api/function/drupal_http_request/6" target="_blank">http://api.drupal.org/api/function/drupal_http_request/6</a><br><font color="#888888"><br>--<br>Regards,<br>Nitin Kumar Gupta<br><a href="http://publicmind.in/blog/" target="_blank">http://publicmind.in/blog/</a><br>


</font></blockquote></div><br></div>