Hi nitin,
Thanks Dipen, It works perfectly well. Thanks for making me aware of the HEAD method.
The headers does not contain "content-length" when invoked on a .php page, is this in accordance with the protocol?On Sun, Dec 6, 2009 at 8:46 PM, Dipen <dipench@gmail.com> wrote:
I havent tried it doing it with drupal but try passing method = HEAD.HEAD /index.htmlwould fetch only headers of that resource, where as GET for instance would also return the content.Cheersdipen
On Sun, Dec 6, 2009 at 7:52 PM, nitin gupta <nitingupta.iitg@gmail.com> wrote:Hi,
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't need to download the whole page?
http://api.drupal.org/api/function/drupal_http_request/6
--
Regards,
Nitin Kumar Gupta
http://publicmind.in/blog/