vendredi 9 janvier 2015

post curl to iis getting 403.1 error


Vote count:

0




Below is my code. I am trying to authenticate to IIS server using curl and post. But i am getting a 403.1 error: "curl You have attempted to execute a CGI, ISAPI, or other executable program from a directory that does not allow programs to be executed."





$reqheader = array(
"Accept:",
"Connection: close", // Disable Keep-Alive
"Expect:", // Disable "100 Continue" server response
"Content-Type: text/xml" // Content Type json
);




$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);

// what to post
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);

// curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $reqheader);
curl_setopt($ch, CURLOPT_USERPWD, "MEE:yhb45cf@f");
$result = curl_exec($ch);

$http_response_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);

echo $result;



any help is greatly appreciated



asked 1 min ago







post curl to iis getting 403.1 error

Aucun commentaire:

Enregistrer un commentaire