Page 1 of 1

How to I use curl to send this header?

Posted: Thu Mar 05, 2009 9:18 am
by LonelyProgrammer
I am trying to use curl to substitute for this header call

Code: Select all

header('HTTP/1.1 302 Found');
The reason why I do not wish to use header() directly is because I don't want the user to be redirected to the page. I have checked through curl on the php site but can't seem to find any examples of sending this type of header strings. What curl options should I set?

Re: How to I use curl to send this header?

Posted: Thu Mar 05, 2009 11:19 am
by miro_igov
curl is not supposed to do this type of functionality. Headers are returned by server on user request. cURL is used to execute on the server to connect and communicate with another servers through different protocols, so cURL could be considered as "client", but only "server" can return headers.