Advertisement
aivanov100

Tryin' to curl, still

Jun 27th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.54 KB | None | 0 0
  1. // Set ShibAuthTermsVer in Dataverse db to update the value of the latest T&C version
  2.   $terms_ver = $form_state[values]['shib_auth_terms_ver'];
  3.   $data = http_build_query(array('BlockedApiPolicy' => 'localhost-only'));
  4.   $ch = curl_init();
  5.   curl_setopt($ch, CURLOPT_URL, "http://localhost:8080/api/v1/admin/settings");
  6.   curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-HTTP-Method-Override: PUT'));
  7.   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  8.   curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
  9.   $response = curl_exec($ch);
  10.   curl_close($ch);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement