scrape_dfrn now scrapes the address as well.

This commit is contained in:
Michael Vogel 2015-11-25 18:46:02 +01:00
parent b888382cc6
commit 602821279a
2 changed files with 14 additions and 7 deletions

View file

@ -4,7 +4,7 @@ require_once('library/HTML5/Parser.php');
require_once('include/crypto.php');
if(! function_exists('scrape_dfrn')) {
function scrape_dfrn($url) {
function scrape_dfrn($url, $dont_probe = false) {
$a = get_app();
@ -17,6 +17,11 @@ function scrape_dfrn($url) {
if(! $s)
return $ret;
$probe = probe_url($url);
if (isset($probe["addr"]))
$ret["addr"] = $probe["addr"];
$headers = $a->get_curl_headers();
logger('scrape_dfrn: headers=' . $headers, LOGGER_DEBUG);
@ -524,7 +529,7 @@ function probe_url($url, $mode = PROBE_NORMAL, $level = 1) {
if(strlen($dfrn)) {
$ret = scrape_dfrn(($hcard) ? $hcard : $dfrn);
$ret = scrape_dfrn(($hcard) ? $hcard : $dfrn, true);
if(is_array($ret) && x($ret,'dfrn-request')) {
$network = NETWORK_DFRN;
$request = $ret['dfrn-request'];