ActivityPub Probe Diagnostic'; $o .= '
'; $o .= '' . htmlspecialchars($x['header']) . '' . EOL; $o .= '
' . htmlspecialchars($x['body']) . '' . EOL; $o .= 'verify returns: ' . str_replace("\n",EOL,print_r(HTTPSig::verify($x),true)) . EOL; $text = $x['body']; } else { $text = $_REQUEST['text']; } if($text) { // if($text && json_decode($text)) { // $normalized1 = jsonld_normalize(json_decode($text),[ 'algorithm' => 'URDNA2015', 'format' => 'application/nquads' ]); // $o .= str_replace("\n",EOL,htmlentities(var_export($normalized1,true))); // $o .= '
' . json_encode($normalized1, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . ''; // } $o .= '
' . str_replace(['\\n','\\'],["\n",''],htmlspecialchars(jindent($text))) . ''; $AP = new ActivityStreams($text); $o .= '
' . htmlspecialchars($AP->debug()) . ''; } return $o; } }