PHP SoapClient Timeout

后端 未结 6 1364
误落风尘
误落风尘 2020-12-05 00:12

Is there anyway for a SoapClient Request to time out and throw an exception. As of now, I get PHP Server response timeout, in my case 60 seconds. Basically what I want is, i

6条回答
  •  一生所求
    2020-12-05 00:50

    ini_set("default_socket_timeout", 15);
    $client = new SoapClient($wsdl, array(......));
    

    The connection_timeout option defines a timeout in seconds for the connection to the SOAP service. This option does not define a timeout for services with slow responses. To limit the time to wait for calls to finish the default_socket_timeout setting is available.

提交回复
热议问题