• API呼び出しサンプル
<?php
// vim: set et ts=4 sw=4 sts=4:

$headers = array(
    'X-Redmine-API-Key: (自分のAPIキー)',
);

$url = '/issues.json';  // 全部
// $url = '/issues.json?project_id=94&sort=updated_on:desc'; // Project94のチケットを更新降順
// $url = '/issues.json?project_id=94&assigned_to_id=1554&sort=updated_on:desc'; // Project94のuser1554チケットを更新降順

$endpoint = 'https://***.***/redmine';
$opts = array(
    'http' => array(
        'method'  => 'GET',
        'header'  => implode("\r\n", $headers),
        'timeout' => 10,
    ),
);
$res = @file_get_contents("{$endpoint}{$url}", false, stream_context_create($opts));
$arr = json_decode($res, true);
if (is_array($arr)) {
    foreach ($arr['issues'] as $v) {
        echo $v['id'], ' ', $v['status']['name'], ' ', $v['priority']['name'], ' ', $v['subject'], "\n";
    }
}

  • mPDFの文字化け対策 Next