v2.1.11-20240119

This commit is contained in:
MI15\Win
2024-01-21 01:31:42 +08:00
parent 851ff8285c
commit 004273c0c4
5 changed files with 30 additions and 6 deletions

View File

@@ -775,4 +775,12 @@ function get_OEM(){
//返回404
function Not_Found() {
header('HTTP/1.1 404 Not Found');header("status: 404 Not Found");exit;
}
function process_url_idn($url) {
$parsed_url = parse_url($url);
if(!preg_match('/[\x{4e00}-\x{9fa5}]/u', $parsed_url['host'])){
return $url;
}
return substr_replace($url, idn_to_ascii($parsed_url['host']), strpos($url, "//") + 2, strlen($parsed_url['host']));
}