php check whether the url is http or https

Solutions on MaxInterview for php check whether the url is http or https by the best coders in the world