Func Curl_Share_Setopt
# PHP curl_share_setopt Function
[ PHP cURL Reference](#)
(PHP 5 >= 5.5.0)
curl_share_setopt β Sets an option on a cURL share handle.
* * *
## Description
bool curl_share_setopt ( resource $sh , int $option , string $value )
Sets an option on a cURL share handle.
* * *
## Parameters
**sh**
The share handle initialized by curl_share_init().
**option**
| Option | Description |
| --- | --- |
| **`CURLSHOPT_SHARE`** | Specifies the data type to share |
| **`CURLSHOPT_UNSHARE`** | Specifies the data type not to share |
**value**
| Value | Description |
| --- | --- |
| **`CURL_LOCK_DATA_COOKIE`** | Share cookie data |
| **`CURL_LOCK_DATA_DNS`** | Share DNS cache. |
| **`CURL_LOCK_DATA_SSL_SESSION`** | Share SSL session ID, reducing the time spent on SSL handshakes when connecting to the same server. |
* * *
## Return Value
Returns TRUE on success or FALSE on failure.
* * *
## Example
This example will create a cURL share handle and add two cURL handles, both sharing cookie data.
* * PHP cURL Reference](#)
YouTip