2022-07-04 07:20:06 +09:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<link rel="stylesheet" type="text/css" href="style.css" />
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<?php
|
|
|
|
if (isset($_GET['status']) && $_GET['status'] != '') {
|
|
|
|
$stat = htmlspecialchars($_GET['status']);
|
|
|
|
|
|
|
|
$ch = curl_init();
|
|
|
|
curl_setopt($ch, CURLOPT_URL, 'https://social.076.ne.jp/api/v1/statuses/'.$stat.'/context');
|
|
|
|
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
|
|
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
|
|
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
|
|
|
|
|
|
|
|
$get = curl_exec($ch);
|
|
|
|
curl_close($ch);
|
|
|
|
|
|
|
|
$comment = json_decode($get)->descendants;
|
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="comment-head">Comments (<?php echo count($comment); ?>)</div>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
foreach ($comment as $c) {
|
|
|
|
?>
|
|
|
|
<hr />
|
|
|
|
<div class="comment-meta">
|
|
|
|
<span class="comment-icon"><img style="max-width: 25px; max-height: 25px;" src="<?php echo $c->account->avatar_static; ?>" alt="<?php echo $c->account->display_name ?>'s icon" /></span>
|
|
|
|
<span class="comment-auth"><a href="<?php echo $c->account->url; ?>"><?php echo $c->account->display_name; ?> (<?php echo $c->account->fqn ?>)</a></span>
|
2022-07-04 07:35:32 +09:00
|
|
|
<div class="comment-date"><?php echo date('Y/m/d, H:i:s', strtotime($c->created_at)); ?></div>
|
2022-07-04 07:20:06 +09:00
|
|
|
</div>
|
|
|
|
<div class="comment-body">
|
|
|
|
<?php echo $c->content; ?>
|
|
|
|
</div>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</body>
|
|
|
|
</html>
|