t('ActivityPub Probe Diagnostic'), '$resource' => ['resource', t('Object URL'), $_REQUEST['resource'], EMPTY_STR], '$authf' => ['authf', t('Authenticated fetch'), $_REQUEST['authf'], EMPTY_STR, [t('No'), t('Yes')]], '$submit' => t('Submit') ]); if (x($_REQUEST, 'resource')) { $resource = $_REQUEST['resource']; if ($_REQUEST['authf']) { $channel = App::get_channel(); if (!$channel) { $channel = Channel::get_system(); } } $x = Activity::fetch($resource, $channel, null, true); if ($x) { $o .= '
' . str_replace('\\n', "\n", htmlspecialchars(json_encode($x, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT))) . '
'; $o .= '
' . str_replace('\\n', "\n", htmlspecialchars(Yaml::encode($x))) . '
'; } } return $o; } }