public static function prefaceURLwithHTTP($url) {
        $url = trim($url);

        if (substr($url, 0, 7 ) == "http://") {
            return $url;
        }

        if (substr($url, 0, 8 ) == "https://") {
            return $url;
        }

        return "http://".$url;
    }
public static function prefaceURLwithHTTP($url) {
        $url = trim($url);

        if (substr($url, 0, 7 ) == "http://") {
            return $url;
        }

        if (substr($url, 0, 8 ) == "https://") {
            return $url;
        }

        return "http://".$url;
    }
public static function prefaceURLwithHTTP ( $ url ) { $ url = trim ( $ url ) ; if ( substr ( $ url , 0 , 7 ) == "http://" ) { return $ url ; } if ( substr ( $ url , 0 , 8 ) == "https://" ) { return $ url ; } return "http://" . $ url ; }
Make sure the URL is fully qualified

@param   string  $url
@return  string
Make sure the URL is fully qualified