ActivityPub Probe Diagnostic';
$o .= '
';
$o .= '
';
if(x($_GET,'addr')) {
$addr = $_GET['addr'];
if($_GET['magenv']) {
$headers = 'Accept: application/magic-envelope+json, application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams"';
}
else {
$headers = 'Accept: application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams"';
}
$redirects = 0;
$x = z_fetch_url($addr,true,$redirects, [ 'headers' => [ $headers ]]);
if($x['success'])
$o .= '' . $x['header'] . '
' . EOL;
$o .= 'verify returns: ' . \HTTPSig::verify($x) . EOL;
$o .= '' . str_replace(['\\n','\\'],["\n",''],jindent($x['body'])) . '
';
}
return $o;
}
}