are you trying to validate it with a specific domain name or just need to validate that it is a domain name?
__________________ Notice: If you post a problem and it gets fixed, please remember to go back and place it as solved. ;)
I always recommend the HEAD First series of books for learning a new coding language. ^_^
but on a side note, do you think the performance issue of preg_match
outweighs the odds of someone just using htttp://domain.com?
Not sure what you mean there. The performance difference of using preg_match() isn't major, we are talking about milliseconds. Either way, it's up to you to decide which method is ideal for your purposes.