curl confusion

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

  I don't understand the all the curl_setopt options.

  What is the difference between:

    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);


curl_setopt($session, CURLOPT_FOLLOWLOCATION ,1);

   My very loose understanding of this is that one or the other is
needed  to "post" fields.

   There must be a better man page than what I've been Googling. The
Constant Contact example code I have uses CURLOPT_FOLLOWLOCATION and I'm
getting a "CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode
or an open_basedir", and I'm having trouble lifting open_basedir on this
server. This is *not* shared hosting.


Re: curl confusion

jeff wrote:
Quoted text here. Click to load it

All of the options are explained in the PHP documentation.  See .

Neither is required for posting data.

Quoted text here. Click to load it

The PHP documentation is the best.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Re: curl confusion

Quoted text here. Click to load it

Wrong on both counts.


If the page you are posting to implements the Post-redirect-get (PRG)
pattern then you won't be able to see the response by the remote
system unless both flags are set.


Site Timeline