curl-and-php
Re: Need to POST with additional headers and content-type/length
Date: Fri, 10 Jan 2003 16:41:53 +0100 (MET)
On Fri, 10 Jan 2003, Paul Slootweg wrote:
> I'm trying to POST to a HTTPS server and the request requires additional
> headers and specific content-type/length values.
> The data to POST is in a variable. and I'm using CURL_RETURNTRANSFER = 1 to
> get the response data.
>
> By using the 'feature' of CURL_CUSTOMREQUEST, I can achieve this, but I'm
> not happy that this is a robust solution.
>
> What is the right way of doing this?
CURLOPT_HTTPHEADER is the option for passing along custom headers.
CURLOPT_POSTFIELDS is the option for passing along data for the POST.
These are the generic libcurl names, the php/curl module may support them
differently.
(Using CUSTOMREQUEST for all that will create a severaly weird request.)
Sorry, I'm not a PHP hacker.
-- Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs. ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.comReceived on 2003-01-10