Handling Soap timeouts in PHP

前端 未结 8 1783
囚心锁ツ
囚心锁ツ 2021-01-30 09:05

I\'m working on a project where I am verifying information from a user with a SOAP web service. I currently am taking care of errors assuming that I\'m receiving responses from

8条回答
  •  借酒劲吻你
    2021-01-30 09:37

    To deal with timeouts in the service

    $client = new SoapClient($wsdl, array("connection_timeout"=>10));
    
    // SET SOCKET TIMEOUT
    if(defined('RESPONSE_TIMEOUT') &&  RESPONSE_TIMEOUT != '') {
     ini_set('default_socket_timeout', RESPONSE_TIMEOUT);
    }
    

提交回复
热议问题