User inputs only urls

Hello, I’m having a problem with how to do this:
User posts something > PHP checks if it is a url, if its not echo an error >if it is a url just continue.
If user posts random text, but not an url echo an error.
Help pls. :-X

Isn’t that what’s supposed to happen?

Sponsor our Newsletter | Privacy Policy | Terms of Service