add clear

This commit is contained in:
as2252258@163.com
2019-12-18 20:02:47 +08:00
parent f68080387a
commit 6148a56126
+5 -1
View File
@@ -237,7 +237,11 @@ class HttpClient
$url = str_replace('https://', '', $url);
}
$explode = explode('/', $url);
return System::gethostbyname(array_shift($explode));
$first = array_shift($explode);
if (preg_match('/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/', $first)) {
return $first;
}
return System::gethostbyname($first);
}
/**