Tuesday, August 30, 2016

How to add http:// if it's not exists in the URL


Let's say you have some input which is url, and the url doesn't always have protocol on it such as http://, https://, ftp://, ftps:// and so on, and you want to automatically add the protocol with php.