]> git.mxchange.org Git - friendica.git/blobdiff - include/Scrape.php
gcontact update script, rebuilt follow page, query speedup for community and network...
[friendica.git] / include / Scrape.php
index b7df8e04feebdac46e9493eb5cfc1b5e0f3a78c4..cb192c77c2cd5c8c21580a51efe36920b8474076 100644 (file)
@@ -547,6 +547,19 @@ function probe_url($url, $mode = PROBE_NORMAL, $level = 1) {
                }
        }
 
+       // Scrape the public key from the hcard.
+       // Diaspora will remove it from the webfinger somewhere in the future.
+       if (($hcard != "") AND ($pubkey == "")) {
+               $ret = scrape_dfrn(($hcard) ? $hcard : $dfrn, true);
+               if (isset($ret["key"])) {
+                       $hcard_key = $ret["key"];
+                       if(strstr($hcard_key,'RSA '))
+                               $pubkey = rsatopem($hcard_key);
+                       else
+                               $pubkey = $hcard_key;
+               }
+       }
+
        if($diaspora && $diaspora_base && $diaspora_guid) {
                if($mode == PROBE_DIASPORA || ! $notify) {
                        $notify = $diaspora_base . 'receive/users/' . $diaspora_guid;
@@ -632,7 +645,9 @@ function probe_url($url, $mode = PROBE_NORMAL, $level = 1) {
 
                if ($connectornetworks)
                        $check_feed = false;
+
                if($check_feed) {
+
                        $feedret = scrape_feed(($poll) ? $poll : $url);
 
                        logger('probe_url: scrape_feed ' . (($poll)? $poll : $url) . ' returns: ' . print_r($feedret,true), LOGGER_DATA);
@@ -760,7 +775,6 @@ function probe_url($url, $mode = PROBE_NORMAL, $level = 1) {
                                        if (isset($noscrapedata["dfrn-poll"]))
                                                $poll = $noscrapedata["dfrn-poll"];
 
-//                                     print_r($noscrapedata);
                                }
                        }