cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: curl redirect

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 10 Jul 2003 14:56:49 +0200 (CEST)

On Tue, 8 Jul 2003, Felix Schubert wrote:

> I got a script which generates a preview from a form. After hitting the
> submit button the preview data is written to a database (This part works)
> and a POST must be transferred to a foreign server (therefore I use curl)
> and the user should be displayed the URL the POST is transferred to.
>
> How do I get a redirect to the foreign server?

> curl_setopt($c, CURLOPT_FOLLOWLOCATION, 1);

If the redirect is made the "traditional" way, this will do it. If it is made
by javascript or similar, you have to do the redirect "manually".

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
Received on 2003-07-10