diff --git a/core/com/http.com.php b/core/com/http.com.php index 17163878e5..4d909565a6 100644 --- a/core/com/http.com.php +++ b/core/com/http.com.php @@ -40,6 +40,7 @@ class com_http { private $userAgent = ''; private $CURLOPT_HTTPAUTH = ''; private $CURLOPT = array(); + private $httpCode = 0; /* * ********************Fonctions statiques********************* */ @@ -113,6 +114,7 @@ public function exec($_timeout = 2, $_maxRetry = 3) { } } $response = curl_exec($ch); + $this->httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); $nbRetry++; if (curl_errno($ch) && $nbRetry < $_maxRetry) { curl_close($ch); @@ -289,4 +291,7 @@ public function setCURLOPT($CURLOPT) { return $this; } + public function getHttpCode() { + return $this->httpCode; + } } \ No newline at end of file