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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.