Guest User

curl

a guest
May 9th, 2018
94
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $ch = curl_init();
  2.  
  3. curl_setopt($ch, CURLOPT_URL,"https://development.alpinebits.org/server-2015-07b/");
  4. curl_setopt($ch, CURLOPT_POST, 1);
  5. curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
  6. curl_setopt($ch, CURLOPT_USERPWD, "someuser:somesecret");
  7. curl_setopt($ch, CURLOPT_HTTPHEADER, array("X-AlpineBits-ClientProtocolVersion: 2015-07b"));
  8. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  9. $data = array(
  10. "action" => "getVersion"
  11. );
  12. curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
  13. $result = curl_exec ($ch);
  14. curl_close ($ch);
RAW Paste Data