Guest User

Untitled

a guest
Dec 16th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. <?php
  2.  
  3. if( !preg_match('/^(?!\-)(?:[a-zA-Z\d\-]{0,62}[a-zA-Z\d]\.){1,126}(?!\d+)[a-zA-Z\d]{1,63}$/', $domain) ){
  4. // didn't match return error
  5. return false;
  6. }
Add Comment
Please, Sign In to add comment