3

I have created a script that fetches all the articles from https://insuredhq.atlassian.net/ below is the code I have used.

$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);

I have checked those image src property and they are dynamic urls like /wiki/download/attachments/13303822/Dashboard.png?version=1&amp;modificationDate=1462935137147&amp;api=v2 and even I change them to static urls like https://insuredhq.atlassian.net/wiki/download/attachments/13303822/Dashboard.png?version=1&amp;modificationDate=1462935137147&amp;api=v2 but still they are not being displayed.

For detailed example please check this link http://hunaniinfotech.com/insecuredhq/article.php?id=13303841

0 Answers0