public function getResponseCode() { if (empty($this->responseStatus)) { throw new \Exception('No response status found'); } $matches = []; preg_match('|HTTP/\\d\\.\\d\\s+(\\d+)\\s+.*|', $this->responseStatus, $matches); return $matches[1]; }
public function getHttpStatusCode($url) { $curlHelper = new Curl($url, [], $this->getSshConnection()); $curlHelper->doRequest(); return $curlHelper->getResponseCode(); }