Check if string is a URL?

So basically if the url is valid you will get with the split an array with 2 elements.

At the index 0 you will have the “http://” and at the index 1 you will have the other part of the url.