aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-08-16 22:14:14 -0700
committerzotlabs <mike@macgirvin.com>2017-08-16 22:14:14 -0700
commitef8a2511156b86c23aa794d7b0eb2514896ea10c (patch)
tree22386ee85194a60831c61955ad18a1b2800ac9f0 /Zotlabs/Module
parent1c5629263bcb4d6b3ffad23fc4571de20eeab029 (diff)
downloadvolse-hubzilla-ef8a2511156b86c23aa794d7b0eb2514896ea10c.tar.gz
volse-hubzilla-ef8a2511156b86c23aa794d7b0eb2514896ea10c.tar.bz2
volse-hubzilla-ef8a2511156b86c23aa794d7b0eb2514896ea10c.zip
move ap_probe to pubcrawl addon
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Ap_probe.php42
1 files changed, 0 insertions, 42 deletions
diff --git a/Zotlabs/Module/Ap_probe.php b/Zotlabs/Module/Ap_probe.php
deleted file mode 100644
index 57e254267..000000000
--- a/Zotlabs/Module/Ap_probe.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-namespace Zotlabs\Module;
-
-require_once('include/zot.php');
-require_once('addon/pubcrawl/HTTPSig.php');
-
-class Ap_probe extends \Zotlabs\Web\Controller {
-
- function get() {
-
- $o .= '<h3>ActivityPub Probe Diagnostic</h3>';
-
- $o .= '<form action="ap_probe" method="get">';
- $o .= 'Lookup URI: <input type="text" style="width: 250px;" name="addr" value="' . $_GET['addr'] .'" /><br>';
- $o .= 'Request Signed version: <input type=checkbox name="magenv" value="1" ><br>';
- $o .= '<input type="submit" name="submit" value="Submit" /></form>';
-
- $o .= '<br /><br />';
-
- 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 .= '<pre>' . $x['header'] . '</pre>' . EOL;
-
- $o .= 'verify returns: ' . \HTTPSig::verify($x) . EOL;
-
- $o .= '<pre>' . str_replace(['\\n','\\'],["\n",''],jindent($x['body'])) . '</pre>';
- }
- return $o;
- }
-
-}