add clear
This commit is contained in:
@@ -195,7 +195,6 @@ class HttpClient
|
||||
*/
|
||||
public function setHost($host)
|
||||
{
|
||||
var_dump($host);
|
||||
$this->host = $this->replaceHost($host);
|
||||
$match_quest = '/^[a-zA-Z\-]+(\.[a-zA-Z\-])+/';
|
||||
if (preg_match($match_quest, $this->host)) {
|
||||
@@ -339,22 +338,22 @@ class HttpClient
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->isHttp($string)) {
|
||||
$_string = str_replace('http://', '', $string);
|
||||
$hostAndUrls = explode('/', $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);
|
||||
} else if ($this->isHttps($_string)) {
|
||||
$_string = str_replace('https://', '', $_string);
|
||||
$this->setIsSSL(true);
|
||||
|
||||
$hostAndUrls = explode('/', $string);
|
||||
$hostAndUrls = explode('/', $_string);
|
||||
|
||||
$this->host = array_shift($hostAndUrls);
|
||||
$_string = implode('/', $hostAndUrls);
|
||||
} else if (empty($this->host)) {
|
||||
$hostAndUrls = explode('/', $string);
|
||||
$hostAndUrls = explode('/', $_string);
|
||||
$this->host = array_shift($hostAndUrls);
|
||||
|
||||
$_string = implode('/', $hostAndUrls);
|
||||
|
||||
Reference in New Issue
Block a user