cURL/PHP Request Executes 50% of the Time

后端 未结 3 1044
旧巷少年郎
旧巷少年郎 2021-01-05 16:04

After searching all over, I can\'t understand why cURL requests issued to a remote SSL-enabled host are successful only 50% or so of the time in my case. Here\'s the situati

3条回答
  •  無奈伤痛
    2021-01-05 16:41

    You may need this option:

    CURLOPT_FORBID_REUSE

    Pass a long. Set to 1 to make the next transfer explicitly close the connection when done. Normally, libcurl keeps all connections alive when done with one transfer in case a succeeding one follows that can re-use them. This option should be used with caution and only if you understand what it does. Set to 0 to have libcurl keep the connection open for possible later re-use (default behavior).

提交回复
热议问题