I'm trying to test the validity of a url entered with php5. I thought of using regex, but assuming that it works correctly all the time, it only solves the problem of the url being syntactically valid. It doesn't tell me anything about the url being correct or working.
I'm trying to find another solution to do both if possible. Or is it better to find 2 separate solutions for this?
If a regex is the way to go, what tested regexes exist for urls?