How do I validate a URL in php? Example: I need the user to enter a url, ex: google.com.
But I need the url to be in the format: www.google.com and if it enters any format other than that it returns an error for it to correct.
If he types specific pages as well. Example www.google.com/images. I need it to validate only up to .br or .com etc ... only up to the domain. How do I?