mirror of
https://github.com/pi-hole/web.git
synced 2025-12-26 21:46:22 +00:00
Move PHP scripts to scripts folder
This commit is contained in:
10
scripts/pi-hole/php/func.php
Normal file
10
scripts/pi-hole/php/func.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
function is_valid_domain_name($domain_name)
|
||||
{
|
||||
return (preg_match("/^([a-z\d](-*[a-z\d])*)(\.([a-z\d](-*[a-z\d])*))*$/i", $domain_name) && //valid chars check
|
||||
preg_match("/^.{1,253}$/", $domain_name) && //overall length check
|
||||
preg_match("/^[^\.]{1,63}(\.[^\.]{1,63})*$/", $domain_name)); //length of each label
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user