Advertisement
Guest User

Untitled

a guest
Jul 8th, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. $username = '##########';
  2. $password = '##########';
  3. $url = "https://insuredhq.atlassian.net/wiki/rest/api/content?spaceKey=IUM&id=Completing%20a%20Task&expand=space,body.view,version,container";
  4. $ch = curl_init();
  5. curl_setopt($ch, CURLOPT_URL, $url);
  6. curl_setopt($ch, CURLOPT_HTTPGET, true);
  7. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  8. curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
  9. curl_setopt($ch, CURLOPT_USERPWD, "{$username}:{$password}");
  10. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
  11. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
  12. $result = curl_exec($ch);
  13. curl_close($ch);//print_r($result);
  14. $result = json_decode($result);
  15. echo "<pre>";
  16. print_r($result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement