Welcome Guest, Not a member yet? Register   Sign In
Function to verify URL?
#3

[eluser]xwero[/eluser]
Validating urls is a tricky thing because one sites allowed characters are not another ones allowed characters. An then you also have the different protocols, the possibility of subdomains or only the domain, the TLD that is extended once in a while. if you create a regex the only thing you are certain of is a list with protocols, if you are not allowing application protocols like skype://, the colon, the two forward slashes and that there has to be a full stop somewhere in the url.

Even if you do a page exists polling to the actual website it's possible it's a redirect or a logged-in-only page.

Basically you have to trust users when it comes to adding urls.


Messages In This Thread
Function to verify URL? - by El Forum - 07-01-2008, 05:00 PM
Function to verify URL? - by El Forum - 07-02-2008, 01:42 AM
Function to verify URL? - by El Forum - 07-02-2008, 02:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB