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

curl-and-php

Re: Getting Raw Response

From: Waruna Geekiyanage <warunans_at_gmail.com>
Date: Wed, 6 Aug 2008 17:38:45 +0530

2008/8/6 Steven Morgan <gatecrasher1981_at_hotmail.com>

> Thanks for your reply Daniel.
>
> I think I've got my terminology mixed up a little, but what I'm referring
> to is the response from a server to a HTTP request made by the cURL client.
> Where I mentioned adding headers to the output, I was just referring to
> where the headers received from the remote server can be prepended to the
> final cURL output (provided when a request is executed). Hope that makes a
> little more sense?
>

Setting CURLOPT_HEADER to 1 will give the output with HTTP headers.

>
>
> As a little background, what I'm trying to do is make use of cURLs
> sophisticated proxy settings, but handle the parsing of the response
> provided by the remote server manually - so I was hoping for access to the
> *exact* data that was received as if it was obtained by a pure socket
> request. I'm just wondering how to achieve this with cURL?
>
> Cheers,
>
> Steve
>
> ------------------------------
>
> > Date: Wed, 6 Aug 2008 13:07:45 +0200
> > From: daniel_at_haxx.se
> > To: curl-and-php_at_cool.haxx.se
> > Subject: Re: Getting Raw Response
>
> >
> > On Wed, 6 Aug 2008, Steven Morgan wrote:
> >
> > > I'm looking to pass a PHP cURL response to my own parsing method, and
> would
> > > like to access the exact response received when a request is made, is
> this
> > > possible? I'm aware that I can add headers to the output for example,
> but
> > > I'm concerned this is not the pure response?
> >
> > The last sentence makes me very puzzled. Of course the *output* is not
> the
> > pure *response*. The output is a request, the response is input (as
> CURL/PHP
> > is always acting as a client).
> >
> > > Additionally, would I be right in thinking that if I were to set a
> cookie
> > > header via CURLOPT_HTTPHEADERS, and disable cURL's built in cookie
> handling
> > > this would still work correctly?
> >
> > Yes, and there's even a shortcut for this called CURLOPT_COOKIE.
> >
> > --
> >
> > / daniel.haxx.se
> > _______________________________________________
> > http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
>
>
> ------------------------------
> Get fish-slapping on Messenger! Play Now<http://clk.atdmt.com/UKM/go/101719805/direct/01/>
>
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
>
>

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