title: php - curl and source
body: <p>Why I get empty source? When I uncommit</p>
  
  <pre><code>//curl_setopt($ch, CURLOPT_URL, 'www.onet.pl'); 
  </code></pre>
  
  <p>and commit</p>
  
  <pre><code>'Accept-Encoding: gzip,deflate,sdch',
  </code></pre>
  
  <p>everything works fine for www.onet.pl. Why it doesn't work for www.ebok.pl (?</p>
  
  <pre><code>&lt;?php
  
      $COOKIEFILE = $_SERVER['DOCUMENT_ROOT'] . '/../data/config/ebok.txt';
  
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
      curl_setopt($ch, CURLOPT_COOKIEJAR, $COOKIEFILE);
      curl_setopt($ch, CURLOPT_COOKIEFILE, $COOKIEFILE);
      curl_setopt($ch,CURLOPT_RETURNTRANSFER, 0);  
  
      curl_setopt($ch,CURLOPT_HTTPHEADER, array('Content-type: application/x-www-form-urlencoded', 
                                                'Accept: text/html,application/xhtml+xml,application/xml', 
                                                'Accept-Encoding: gzip,deflate,sdch', 
                                                'Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4',                                              
                                                'Connection: keep-alive',
                                                'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36')
                                                );
      //curl_setopt($ch, CURLOPT_URL, 'http://www.ebok.pl');        
      curl_setopt($ch, CURLOPT_URL, 'https://ssl.plusgsm.pl/ebok-web/');        
      //curl_setopt($ch, CURLOPT_URL, 'www.onet.pl');        
      echo curl_exec($ch);
  
  
  ?&gt;    
  </code></pre>
  
  <p>I need to log-in to this page.</p>