Skip to content

Instantly share code, notes, and snippets.

View styxit's full-sized avatar
🤘

Floris Ankersmit styxit

🤘
View GitHub Profile
@styxit
styxit / SoapClientTimeout.class.php
Created July 24, 2012 12:18 — forked from RobThree/SoapClientTimeout.class.php
PHP SoapClient with timeout
//Drop-in replacement for PHP's SoapClient class supporting connect and response/transfer timeout
//Usage: Exactly as PHP's SoapClient class, except that 3 new options are available:
// timeout The response/transfer timeout in milliseconds; 0 == default SoapClient / CURL timeout
// connecttimeout The connection timeout; 0 == default SoapClient / CURL timeout
// sslverifypeer FALSE to stop SoapClient from verifying the peer's certificate
class SoapClientTimeout extends SoapClient
{
private $timeout = 0;
private $connecttimeout = 0;
private $sslverifypeer = true;