title: curl fail when request in server
body: <p>I have 1 REST api : </p>
  
  <pre><code>http://www.animemobile.com/service/v2/mobile2.php?episode_id=47272
  </code></pre>
  
  <p>I use curl to request it, in my PC with xampp, it works well and returns the correct results. This is results from my PC with xampp:</p>
  
  <pre><code>[
   {
      "Title":"English Subbed",
      "link":"\/[HorribleSubs] Pascal-sensei - 01 [720p]_af.mp4?
              st=14GwNjlMxuI8524DS56IUA&amp;e=1495183034"
   }
  ]
  </code></pre>
  
  <p>I use </p>
  
  <pre><code>/[HorribleSubs] Pascal-sensei - 01 [720p]_af.mp4?
              st=14GwNjlMxuI8524DS56IUA&amp;e=1495183034
  </code></pre>
  
  <p>to create a link as:</p>
  
  <pre><code>http://st2.anime1.com/[HorribleSubs]%20Pascal-sensei%20-
  %2001%20[720p]_af.mp4?st=14GwNjlMxuI8524DS56IUA&amp;e=1495183034.
  </code></pre>
  
  <p>This link is a video that can be played when request from browser (now).</p>
  
  <p>But when I use the curl in my SERVER, it still works well but does not return the correct results. This is results from my Server:</p>
  
  <pre><code>[
   {
      "Title":"English Subbed",
      "link":"\/[HorribleSubs] Pascal-sensei - 01 [720p]_af.mp4?
              st=ghDP4290fsBNdmfsSKCD=1495195645"
   }
  ]
  </code></pre>
  
  <p>When I use </p>
  
  <pre><code>/[HorribleSubs] Pascal-sensei - 01 [720p]_af.mp4?
              st=ghDP4290fsBNdmfsSKCD=1495195645
  </code></pre>
  
  <p>to create a link as:</p>
  
  <pre><code>http://st2.anime1.com/[HorribleSubs]%20Pascal-sensei%20-
  %2001%20[720p]_af.mp4?%20st=ghDP4290fsBNdmfsSKCD=1495195645. 
  </code></pre>
  
  <p>It doesn't play on my browser.</p>
  
  <p>This is my curl:</p>
  
  <pre><code>    $c = curl_init();
      curl_setopt($c, CURLOPT_URL, $url);
      curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt($c, CURLOPT_ENCODING, 'gzip,deflate');
      curl_setopt($c, CURLINFO_HEADER_OUT, true);
      $headers = [
          'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
          'Accept-Encoding: gzip, deflate, sdch',
          'Accept-Language: vi,en-US;q=0.8,en;q=0.6',
          'Cache-Control: max-age=0',
          'Connection: keep-alive',
          'Cookie: __cfduid=d7bf11c717fbcd54ec9b259e301a966d71480412679',
          'Host: www.animemobile.com',
          'Upgrade-Insecure-Requests: 1',
          'User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36'
      ];
      curl_setopt($c, CURLOPT_HTTPHEADER, $headers);
      $data = curl_exec($c);
  </code></pre>
  
  <p>What is the problem here? Please help me!</p>
  
  <p>Edit1: If you want to test the results, you need to request the REST-api again because it had limited time for link to be created. Important that request the REST-api on PC returns correct results but request from server returns wrong results although they look very similar!</p>