cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Raw headers from return value (-d equivalent)

From: Deepesh Malviya <deep0mal_at_gmail.com>
Date: Mon, 9 Aug 2010 22:45:32 +0530

You can set curl_setopt($curl, CURLOPT_HEADER, true); to get the HTTP
headers along with response. If you need more, you can use curl_setopt($ch,
CURLOPT_HEADERFUNCTION, 'read_header'); where read_header will be the
function in which you can customize your reading.

For more info on these, http://in2.php.net/curl_setopt

Thanks,
Deepesh
http://voidweb.com

On Mon, Aug 9, 2010 at 8:59 PM, Marc Guay <marc.guay_at_gmail.com> wrote:

> Hi folks. Using the PHP library is there any way to get the raw
> headers out of the return value? Equivalent of command line
> http://curl.haxx.se/docs/manpage.html#-D--dump-header?
>
> Thanks,
> Marc
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
>

-- 
_Deepesh

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2010-08-09