curl_setopt

bool curl_setopt(int curld, int option, mixed value) 
curld Handle of the cURL session
option Option to set
value Value of the option

Sets an option on a cURL session.

Returns:

TRUE on success; FALSE on failure

Description:

Sets an option on the cURL session referred to by curld , which must be a valid cURL handle created with curl_init(). If curld is not a valid cURL handle, a warning is issued and nothing happens. If the call is successful, the option indicated by option is set to the value given by value .

All the possible options have corresponding constants, which are defined by PHP when the cURL package is available. These contants, along with the expected types for value , are described in the following list.

Constant ...

Get PHP Functions Essential Reference now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.