filestack/mixins/CommonMixin.php
public function isUrl($url)
    {
        $path = parse_url($url, PHP_URL_PATH);
        $encoded_path = array_map('urlencode', explode('/', $path));
        $url = str_replace($path, implode('/', $encoded_path), $url);

        return filter_var($url, FILTER_VALIDATE_URL);
    }
public function isUrl($url)
    {
        $path = parse_url($url, PHP_URL_PATH);
        $encoded_path = array_map('urlencode', explode('/', $path));
        $url = str_replace($path, implode('/', $encoded_path), $url);

        return filter_var($url, FILTER_VALIDATE_URL);
    }
public function isUrl ( $ url ) { $ path = parse_url ( $ url , PHP_URL_PATH ) ; $ encoded_path = array_map ( 'urlencode' , explode ( '/' , $ path ) ) ; $ url = str_replace ( $ path , implode ( '/' , $ encoded_path ) , $ url ) ; return filter_var ( $ url , FILTER_VALIDATE_URL ) ; }
Check if a string is a valid url.

@param   string  $url    url string to check

@return bool
Check if a string is a valid url .