add clear
This commit is contained in:
@@ -311,7 +311,23 @@ class HttpClient
|
||||
if (!$this->checkIsIp($this->host)) {
|
||||
$this->host = System::gethostbyname($this->host);
|
||||
}
|
||||
var_dump($this->host, $string);
|
||||
|
||||
if ($this->isHttp($string)) {
|
||||
$string = str_replace('http://', '', $string);
|
||||
$hostAndUrls = explode('/', $string);
|
||||
|
||||
$this->host = array_shift($hostAndUrls);
|
||||
$string = implode('/', $hostAndUrls);
|
||||
} else if ($this->isHttps($string)) {
|
||||
$string = str_replace('https://', '', $string);
|
||||
$this->setIsSSL(true);
|
||||
|
||||
$hostAndUrls = explode('/', $string);
|
||||
|
||||
$this->host = array_shift($hostAndUrls);
|
||||
$string = implode('/', $hostAndUrls);
|
||||
}
|
||||
|
||||
return $string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user