المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : How to Validate the format of a domain name by php



bahattab
05-12-2009, 11:19 PM
How to Validate the format of a domain name



Validate the format of a domain name:


if (!preg_match("(^([-a-z0-9]+\.)+[a-z]{2,4}$)i", $domain)) echo "Domain name $domain is not valid";
http://tips-scripts.com/one_liners_php