From 255b9e1f56cbf3f97fb4f1fdb85b9ab49dca553f Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Fri, 31 Jan 2014 16:27:03 +0100 Subject: [PATCH] [FIX] API Timeout added Fixes #1643 --- public/include/classes/tools.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/include/classes/tools.class.php b/public/include/classes/tools.class.php index e00b370b..8778a200 100644 --- a/public/include/classes/tools.class.php +++ b/public/include/classes/tools.class.php @@ -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().')'); }