I’m sending a cURL request and populating it with just the URL. The headers that are sent out to the server are populated I’m imagining by cURL, when exactly are these headers populated, I’m guessing, when I call curl_exec?
I’m very interested how I can get these headers after they have been populated, in particular the Host value. I’m aware of CURLINFO_EFFECTIVE_URL, although this is not the same as Host.
They are set to default values on init and you can view the headers by setting
curl_setopt($ch, CURLOPT_VERBOSE, TRUE);It will spit out the request headers (lines prefixed with ‘>’)