]> git.mxchange.org Git - friendica.git/blob - mod/webfinger.php
Merge pull request #1338 from annando/1501-global-contacts
[friendica.git] / mod / webfinger.php
1 <?php
2
3
4
5 function webfinger_content(&$a) {
6
7         $o .= '<h3>Webfinger Diagnostic</h3>';
8
9         $o .= '<form action="webfinger" method="get">';
10         $o .= 'Lookup address: <input type="text" style="width: 250px;" name="addr" value="' . $_GET['addr'] .'" />';
11         $o .= '<input type="submit" name="submit" value="Submit" /></form>'; 
12
13         $o .= '<br /><br />';
14
15         if(x($_GET,'addr')) {
16                 $addr = trim($_GET['addr']);
17                 if(strpos($addr,'@' !== false))
18                         $res = webfinger($addr);
19                 else
20                         $res = lrdd($addr);
21                 $o .= '<pre>';
22                 $o .= str_replace("\n",'<br />',print_r($res,true));
23                 $o .= '</pre>';
24         }
25         return $o;
26 }