How to I use curl to send this header?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
LonelyProgrammer
Forum Contributor
Posts: 108
Joined: Sun Oct 12, 2003 7:10 am

How to I use curl to send this header?

Post 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?
miro_igov
Forum Contributor
Posts: 485
Joined: Fri Mar 31, 2006 5:06 am
Location: Bulgaria

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

Post 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.
Post Reply