[FIX] API Timeout added

Fixes #1643
This commit is contained in:
Sebastian Grewe 2014-01-31 16:27:03 +01:00
parent 319d9439a4
commit 255b9e1f56

View File

@ -19,6 +19,8 @@ class Tools extends Base {
static $ch = null;
if (is_null($ch)) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; PHP client; '.php_uname('s').'; PHP/'.phpversion().')');
}