mirror of
https://github.com/tznb1/TwoNav.git
synced 2025-08-10 08:51:49 +00:00
v2.1.11-20240119
This commit is contained in:
@@ -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']));
|
||||
}
|
||||
Reference in New Issue
Block a user