public function setProxy($host, $port, $type = CURLPROXY_HTTP)
    {
        if (!empty($host) && !empty($port)) {
            $this->proxyHost = stripslashes(trim($host));
            $this->proxyPort = intval($port);
            $this->proxyType = intval($type);
        }
    }