original_string: protected function curlOptionsDefault($url)
      {
          $this->debug->groupCollapsed(__METHOD__);
          $opts = array(
              // 'CURLOPT_VERBOSE'    => 1,
              // 'CURLOPT_STDERR'     => fopen(dirname($_SERVER['SCRIPT_FILENAME']).'/stderr.txt','a'),
              // 'CURLOPT_COOKIEJAR'  => 'c:/shazbot.txt',    // broken was only grabbing 2 of 3 cookies
              // 'CURLOPT_COOKIEFILE' => 'c:/shazbot.txt',
              // 'CURLOPT_CAINFO'     => '/usr/local/apache/htdocs/ca-bundle.cert',
              'curl_getinfo'          => false,   // whether to display
              'verbose'               => false,
              'CURLINFO_HEADER_OUT'   => true,
              'CURLOPT_FOLLOWLOCATION'=> false,   // will follow manualy because of the cookie problem
              'CURLOPT_HEADER'        => true,    // return header (to grab cookies n whatnot)
              'CURLOPT_IPRESOLVE'     => CURL_IPRESOLVE_V4,
              'CURLOPT_URL'           => $url,
              'CURLOPT_HTTPHEADER'    => array(),
              'CURLOPT_REFERER'       => Html::getSelfUrl(array(), array('fullUrl'=>true,'chars'=>false)),
              'CURLOPT_RETURNTRANSFER'=> true,    // return string rather than echo
              'CURLOPT_SSL_VERIFYPEER'=> false,
              'CURLOPT_USERAGENT'     => !empty($_SERVER['HTTP_USER_AGENT'])
                  ? $_SERVER['HTTP_USER_AGENT']
                  : 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)',
          );
          $opts = \array_merge($opts, $this->cfg['curl_opts']);
          $proxy = \getenv('http_proxy');
          if ($proxy) {
              $this->debug->log('http_proxy env var set...setting default PROXY, CURLOPT_PROXYUSERPWD, and PROXYAUTH');
              $pup = \parse_url($proxy);
              $opts['CURLOPT_PROXY'] = $pup['host'];
              if (!empty($pup['port'])) {
                  $opts['CURLOPT_PROXY'] .= ':'.$pup['port'];
              }
              if (!empty($pup['user'])) {
                  $opts['CURLOPT_PROXYUSERPWD'] = $pup['user'];
                  if (!empty($pup['pass'])) {
                      $opts['CURLOPT_PROXYUSERPWD'] .= ':'.$pup['pass'];
                  }
              }
              $opts['CURLOPT_PROXYAUTH'] = CURLAUTH_BASIC;    // | CURLAUTH_NTLM;
          }
          // $this->debug->log('opts', $opts);
          $this->debug->groupEnd();
          return $opts;
      }
code: protected function curlOptionsDefault($url)
      {
          $this->debug->groupCollapsed(__METHOD__);
          $opts = array(
              // 'CURLOPT_VERBOSE'    => 1,
              // 'CURLOPT_STDERR'     => fopen(dirname($_SERVER['SCRIPT_FILENAME']).'/stderr.txt','a'),
              // 'CURLOPT_COOKIEJAR'  => 'c:/shazbot.txt',    // broken was only grabbing 2 of 3 cookies
              // 'CURLOPT_COOKIEFILE' => 'c:/shazbot.txt',
              // 'CURLOPT_CAINFO'     => '/usr/local/apache/htdocs/ca-bundle.cert',
              'curl_getinfo'          => false,   // whether to display
              'verbose'               => false,
              'CURLINFO_HEADER_OUT'   => true,
              'CURLOPT_FOLLOWLOCATION'=> false,   // will follow manualy because of the cookie problem
              'CURLOPT_HEADER'        => true,    // return header (to grab cookies n whatnot)
              'CURLOPT_IPRESOLVE'     => CURL_IPRESOLVE_V4,
              'CURLOPT_URL'           => $url,
              'CURLOPT_HTTPHEADER'    => array(),
              'CURLOPT_REFERER'       => Html::getSelfUrl(array(), array('fullUrl'=>true,'chars'=>false)),
              'CURLOPT_RETURNTRANSFER'=> true,    // return string rather than echo
              'CURLOPT_SSL_VERIFYPEER'=> false,
              'CURLOPT_USERAGENT'     => !empty($_SERVER['HTTP_USER_AGENT'])
                  ? $_SERVER['HTTP_USER_AGENT']
                  : 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)',
          );
          $opts = \array_merge($opts, $this->cfg['curl_opts']);
          $proxy = \getenv('http_proxy');
          if ($proxy) {
              $this->debug->log('http_proxy env var set...setting default PROXY, CURLOPT_PROXYUSERPWD, and PROXYAUTH');
              $pup = \parse_url($proxy);
              $opts['CURLOPT_PROXY'] = $pup['host'];
              if (!empty($pup['port'])) {
                  $opts['CURLOPT_PROXY'] .= ':'.$pup['port'];
              }
              if (!empty($pup['user'])) {
                  $opts['CURLOPT_PROXYUSERPWD'] = $pup['user'];
                  if (!empty($pup['pass'])) {
                      $opts['CURLOPT_PROXYUSERPWD'] .= ':'.$pup['pass'];
                  }
              }
              $opts['CURLOPT_PROXYAUTH'] = CURLAUTH_BASIC;    // | CURLAUTH_NTLM;
          }
          // $this->debug->log('opts', $opts);
          $this->debug->groupEnd();
          return $opts;
      }
code_tokens: protected function curlOptionsDefault ( $ url ) { $ this -> debug -> groupCollapsed ( __METHOD__ ) ; $ opts = array ( // 'CURLOPT_VERBOSE'    => 1, // 'CURLOPT_STDERR'     => fopen(dirname($_SERVER['SCRIPT_FILENAME']).'/stderr.txt','a'), // 'CURLOPT_COOKIEJAR'  => 'c:/shazbot.txt',    // broken was only grabbing 2 of 3 cookies // 'CURLOPT_COOKIEFILE' => 'c:/shazbot.txt', // 'CURLOPT_CAINFO'     => '/usr/local/apache/htdocs/ca-bundle.cert', 'curl_getinfo' => false , // whether to display 'verbose' => false , 'CURLINFO_HEADER_OUT' => true , 'CURLOPT_FOLLOWLOCATION' => false , // will follow manualy because of the cookie problem 'CURLOPT_HEADER' => true , // return header (to grab cookies n whatnot) 'CURLOPT_IPRESOLVE' => CURL_IPRESOLVE_V4 , 'CURLOPT_URL' => $ url , 'CURLOPT_HTTPHEADER' => array ( ) , 'CURLOPT_REFERER' => Html :: getSelfUrl ( array ( ) , array ( 'fullUrl' => true , 'chars' => false ) ) , 'CURLOPT_RETURNTRANSFER' => true , // return string rather than echo 'CURLOPT_SSL_VERIFYPEER' => false , 'CURLOPT_USERAGENT' => ! empty ( $ _SERVER [ 'HTTP_USER_AGENT' ] ) ? $ _SERVER [ 'HTTP_USER_AGENT' ] : 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)' , ) ; $ opts = \ array_merge ( $ opts , $ this -> cfg [ 'curl_opts' ] ) ; $ proxy = \ getenv ( 'http_proxy' ) ; if ( $ proxy ) { $ this -> debug -> log ( 'http_proxy env var set...setting default PROXY, CURLOPT_PROXYUSERPWD, and PROXYAUTH' ) ; $ pup = \ parse_url ( $ proxy ) ; $ opts [ 'CURLOPT_PROXY' ] = $ pup [ 'host' ] ; if ( ! empty ( $ pup [ 'port' ] ) ) { $ opts [ 'CURLOPT_PROXY' ] .= ':' . $ pup [ 'port' ] ; } if ( ! empty ( $ pup [ 'user' ] ) ) { $ opts [ 'CURLOPT_PROXYUSERPWD' ] = $ pup [ 'user' ] ; if ( ! empty ( $ pup [ 'pass' ] ) ) { $ opts [ 'CURLOPT_PROXYUSERPWD' ] .= ':' . $ pup [ 'pass' ] ; } } $ opts [ 'CURLOPT_PROXYAUTH' ] = CURLAUTH_BASIC ; // | CURLAUTH_NTLM; } // $this->debug->log('opts', $opts); $ this -> debug -> groupEnd ( ) ; return $ opts ; }
docstring: Get defautl cURL options
  
  @param string $url url
  
  @return array
docstring_tokens: Get defautl cURL options