Hi,
I need to ensure that user-submitted URLs (which have a tendency to come without the http:// bit) are valid. Does anyone know of a function that'll transform an input string into a valid URL (perhaps including checking that the URL exists).
Many thanks,
Dom
you can do a simple [man]strpos[/man] check to see if a string begins with http:// or https:// and if it does not then add it. to test the actual validity of the URL just feed it to [man]fopen[/man] which will return boolean false on failure.