lib/TheTwelve/Foursquare/HttpClient/CurlHttpClient.php
protected function initCurlHandler($uri)
    {

        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $uri);
        curl_setopt($ch, CURLOPT_USERAGENT, 'twelvelabs/foursquare client');
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $this->verifyHost);

        if ($this->verifyPeer === false) {
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        } else {

            // @see http://curl.haxx.se/docs/caextract.html

            if (!file_exists($this->certificatePath)) {
                throw new \RuntimeException('cacert.pem file not found');
            }

            curl_setopt ($ch, CURLOPT_CAINFO, $this->certificatePath);

        }

        return $ch;

    }
protected function initCurlHandler($uri)
    {

        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $uri);
        curl_setopt($ch, CURLOPT_USERAGENT, 'twelvelabs/foursquare client');
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $this->verifyHost);

        if ($this->verifyPeer === false) {
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        } else {

            // @see http://curl.haxx.se/docs/caextract.html

            if (!file_exists($this->certificatePath)) {
                throw new \RuntimeException('cacert.pem file not found');
            }

            curl_setopt ($ch, CURLOPT_CAINFO, $this->certificatePath);

        }

        return $ch;

    }
protected function initCurlHandler ( $ uri ) { $ ch = curl_init ( ) ; curl_setopt ( $ ch , CURLOPT_URL , $ uri ) ; curl_setopt ( $ ch , CURLOPT_USERAGENT , 'twelvelabs/foursquare client' ) ; curl_setopt ( $ ch , CURLOPT_RETURNTRANSFER , true ) ; curl_setopt ( $ ch , CURLOPT_SSL_VERIFYHOST , $ this -> verifyHost ) ; if ( $ this -> verifyPeer === false ) { curl_setopt ( $ ch , CURLOPT_SSL_VERIFYPEER , false ) ; } else { // @see http://curl.haxx.se/docs/caextract.html if ( ! file_exists ( $ this -> certificatePath ) ) { throw new \ RuntimeException ( 'cacert.pem file not found' ) ; } curl_setopt ( $ ch , CURLOPT_CAINFO , $ this -> certificatePath ) ; } return $ ch ; }
initialize the cURL handler
@param string $uri
@return resource
initialize the cURL handler