curl-and-php
Re: How to Pass Variables with HTTPHEADER?
Date: Thu, 21 Oct 2004 17:09:02 +0200 (CEST)
On Thu, 21 Oct 2004, Carissa McNaught wrote:
> I am using CURL to post ot an external system, and one of the requirements
> of the system is that when you finish posting it has to go to a URL say
> manage.jsp?PAGE_NUMBER=1
"go to" means do a GET I presume? So you need to first POST and then GET?
> I can't seem to get HTTPHEADER to set the Location: properly
Are you talking about CURLOPT_HTTPHEADER here? If so, you're way off. That is
for *sending* headers to the server. Sending Location: to the server won't do
anything good.
> so that the FOLLOWLOCATION will follow the header
FOLLOWLOCATION follows *received* Location: headers that is sent from the
server and received by libcurl.
> that I have sent rather than the default Location: header being sent from
> the server.
Then don't follow the location, use a second GET request.
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-10-21