| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public static function setup($ch) |
||
| 15 | { |
||
| 16 | static $sh; |
||
| 17 | |||
| 18 | if (!function_exists('curl_share_init')) { |
||
| 19 | return; |
||
| 20 | } |
||
| 21 | |||
| 22 | if (!$sh) { |
||
| 23 | $sh = curl_share_init(); |
||
| 24 | curl_share_setopt($sh, CURLSHOPT_SHARE, CURL_LOCK_DATA_DNS); |
||
| 25 | curl_share_setopt($sh, CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE); |
||
| 26 | curl_share_setopt($sh, CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION); |
||
| 27 | } |
||
| 28 | |||
| 29 | curl_setopt($ch, CURLOPT_SHARE, $sh); |
||
| 30 | } |
||
| 31 | } |
||
| 32 |