Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $username = '##########';
- $password = '##########';
- $url = "https://insuredhq.atlassian.net/wiki/rest/api/content?spaceKey=IUM&id=Completing%20a%20Task&expand=space,body.view,version,container";
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_HTTPGET, true);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
- curl_setopt($ch, CURLOPT_USERPWD, "{$username}:{$password}");
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
- $result = curl_exec($ch);
- curl_close($ch);//print_r($result);
- $result = json_decode($result);
- echo "<pre>";
- print_r($result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement