public function setUrl(string $url)
    {
        $url = filter_var($url, FILTER_VALIDATE_URL);

        if ($url == false) {
            throw new Exception("Invalid url");
        } else {
            curl_setopt($this->curl, CURLOPT_URL, $url);
        }
    }
public function setUrl(string $url)
    {
        $url = filter_var($url, FILTER_VALIDATE_URL);

        if ($url == false) {
            throw new Exception("Invalid url");
        } else {
            curl_setopt($this->curl, CURLOPT_URL, $url);
        }
    }
public function setUrl ( string $ url ) { $ url = filter_var ( $ url , FILTER_VALIDATE_URL ) ; if ( $ url == false ) { throw new Exception ( "Invalid url" ) ; } else { curl_setopt ( $ this -> curl , CURLOPT_URL , $ url ) ; } }
Set the url for the curl
@param string $url
@throws Exception
Set the url for the curl