title: Fix Cookie Web Scrape By Curl PHP (Cookie no Full)
body: <p>I need help, For cookie problems on php curl.
  the cookies formed by curl are incomplete, if I compare them to cookies on firefox.
  here is my script:</p>
  
  <pre><code>$ch = curl_init();
  curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:68.0) Gecko/20100101 Firefox/68.0");
  curl_setopt($ch, CURLOPT_URL, 'https://ibank.bankmandiri.co.id/retail3/');
  curl_setopt($ch, CURLOPT_REFERER, 'https://image.bankmandiri.co.id/8888555/cc.js');
  curl_setopt( $ch, CURLOPT_COOKIEFILE,'cookie.txt' );
  curl_setopt( $ch, CURLOPT_COOKIEJAR, 'cookie.txt' );
  curl_setopt($ch, CURLOPT_COOKIESESSION, TRUE); 
  curl_setopt( $ch, CURLOPT_POST, 0 );
  curl_setopt( $ch, CURLOPT_HTTPGET, 1 );
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  $setq = curl_exec($ch);
  </code></pre>
  
  <p>Cookie from curl : </p>
  
  <pre><code>Cookie: JSESSIONIDRET3=hz4CdHjpQw8p2jpvHvlt9HJCwckvg84PR1J3zXWpY99wsr8KQlyc!480099304; fcib=og==; ibankbankmandiri=36874432.24862.0000
  </code></pre>
  
  <p>should be :</p>
  
  <pre><code> Cookie: ___r8888555=0.1332363836306; __gdic=jrfo3dgxx8x0yvoaqs; visid_incap_1970073=X/QalUTURdSnOGHEUYxfFwihcFwAAAAAQUIPAAAAAACM25SIhDuiZO5z57eFpjIT; visid_incap_2069360=WC2zAZ1FScKkXnGIFCUBdbt67lwAAAAAQUIPAAAAAADgYuKVS8IAfEiBhQcUJ2XD; GUEST_LANGUAGE_ID=in_ID; visid_incap_1882118=vv6PiTN0TOKUDbko8D6IIsFVB10AAAAAQUIPAAAAAACGY0U47LcZhKc2KB5pUwCm; _ga=GA1.3.1178971334.1560761804; ___tk8888555=0.5003533501976778; LSESSIONID=jLd1pqQc5IMncCyKKBgg3j0Np%2FmSo3jYVE23EXavFtPX08UvPst468GiZnKKy4wOQEmaHqUjhBAUK1yUeKc%3D; ___so8888555=eyJsc2giOjIwMzYyOTkwOTUsInNkIjpudWxsLCJzZGMiOm51bGwsImUiOnsibiI6MywiYSI6W3siMiI6dHJ1ZX0sIjIiXSwicmlkIjowLjQ5MDAzODQwNjk5MDgyMzI0fSwiciI6Ii9yZXRhaWwzL2xvZ2luZm8vbG9naW5SZXF1ZXN0IiwibiI6MSwiYyI6MX0%3D; nlbi_2069360=N6TjWMOnexlxhW/AthoRtwAAAACTwuUJw/h+48NOutzsyki3; incap_ses_1121_2069360=7cdyNT5b/DLHOXiv5ZeOD6sERV0AAAAAWIHVQIOqQyuM/e/hnsP/cw==
  </code></pre>
  
  <p>How do I resolve this problem?</p>