This question already has an answer here:
I am creating a frontend form in WordPress where I am using a simple HTML textbox to input a web url. Now I want to check if the value entered is a URL and not just any random text. Anyway to do that?
</div>
if (str[i] == 'w' && str[i+1] == 'w' && str[i+2] == 'w' && str[i+3] == '.')
return (1);