How to add http:// if it's not exists in the URL?
- by David
Hi,
How to add http:// to the url if there isn't a http:// or https:// or ftp:// ?
Example:
addhttp("www.google.com"); // http://www.google.com
addhttp("google.com"); // http://google.com
addhttp("ftp://google.com"); // ftp://google.com
addhttp("https://google.com"); // https://google.com
addhttp("http://google.com"); // http://google.com