title: Make Request With PHP And Curl Using Proxy And Allow Cookies
body: <p>My Code:</p>
  
  <pre><code>function skype_resolver($username) {
      $url = "http://skyperesolver.net/api/?isapi=true&amp;get=skype&amp;user=" . $username;
  
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  
      curl_setopt($ch, CURLOPT_COOKIE, true);
      curl_setopt($ch, CURLOPT_PROXY, '177.12.236.216:80');
      curl_setopt($ch, CURLOPT_COOKIEJAR, '/tmp/cookies.txt');
      curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/cookies.txt');
  
      $output = curl_exec($ch);
      $info = curl_getinfo($ch);
      curl_close($ch);    
  
      return $output;
  }
  </code></pre>
  
  <p>And The Response Is:</p>
  
  <pre><code>Please Enable Cookies
  </code></pre>
  
  <p>How do i do?
  In my browser the response of "<a href="http://skyperesolver.net/api/?isapi=true&amp;get=skype&amp;user=xxuser" rel="nofollow noreferrer">http://skyperesolver.net/api/?isapi=true&amp;get=skype&amp;user=xxuser</a>" is:</p>
  
  <pre><code>190.255.121.56 Country: Colombia State: Bogota D.C. City: Bogotá ISP: COLOMBIA TELECOMUNICACIONES S.A. ESP VPN Dectected: No
  </code></pre>
  
  <p>Thanks.</p>