src/WebRequest.php
protected function curlInit()
    {
        $curlHandle = curl_init();
        curl_setopt($curlHandle, CURLOPT_URL, $this->requestUrl);
        $this->requestUrl = $this->url;  // Reset request URL
        // Set Curl Options
        foreach ($this->curlOptions as $key => $value) {
            curl_setopt($curlHandle, $key, $value);
        }

        // Check if have header
        if (count($this->requestHeader) > 0) {
            curl_setopt($curlHandle, CURLOPT_HTTPHEADER, $this->requestHeader);
            $this->requestHeader = []; // Reset request Header
        }

        // Add Cookies
        if (count($this->cookies) > 0) {
            curl_setopt($curlHandle, CURLOPT_COOKIE, implode(";", $this->cookies));
            $this->cookies = []; // Reset request Header
        }

        // Set last fetched URL
        $this->lastFetchedUrl = null;

        return $curlHandle;
    }
protected function curlInit()
    {
        $curlHandle = curl_init();
        curl_setopt($curlHandle, CURLOPT_URL, $this->requestUrl);
        $this->requestUrl = $this->url;  // Reset request URL
        // Set Curl Options
        foreach ($this->curlOptions as $key => $value) {
            curl_setopt($curlHandle, $key, $value);
        }

        // Check if have header
        if (count($this->requestHeader) > 0) {
            curl_setopt($curlHandle, CURLOPT_HTTPHEADER, $this->requestHeader);
            $this->requestHeader = []; // Reset request Header
        }

        // Add Cookies
        if (count($this->cookies) > 0) {
            curl_setopt($curlHandle, CURLOPT_COOKIE, implode(";", $this->cookies));
            $this->cookies = []; // Reset request Header
        }

        // Set last fetched URL
        $this->lastFetchedUrl = null;

        return $curlHandle;
    }
protected function curlInit ( ) { $ curlHandle = curl_init ( ) ; curl_setopt ( $ curlHandle , CURLOPT_URL , $ this -> requestUrl ) ; $ this -> requestUrl = $ this -> url ; // Reset request URL // Set Curl Options foreach ( $ this -> curlOptions as $ key => $ value ) { curl_setopt ( $ curlHandle , $ key , $ value ) ; } // Check if have header if ( count ( $ this -> requestHeader ) > 0 ) { curl_setopt ( $ curlHandle , CURLOPT_HTTPHEADER , $ this -> requestHeader ) ; $ this -> requestHeader = [ ] ; // Reset request Header } // Add Cookies if ( count ( $ this -> cookies ) > 0 ) { curl_setopt ( $ curlHandle , CURLOPT_COOKIE , implode ( ";" , $ this -> cookies ) ) ; $ this -> cookies = [ ] ; // Reset request Header } // Set last fetched URL $ this -> lastFetchedUrl = null ; return $ curlHandle ; }
Request the method using the CURLOPT defined previously;

@return resource
Request the method using the CURLOPT defined previously ;