$xrd_timeout = Config::get('system', 'xrd_timeout', 20);
$redirects = 0;
+ logger("Probing for ".$host, LOGGER_DEBUG);
+
$ret = z_fetch_url($ssl_url, false, $redirects, array('timeout' => $xrd_timeout, 'accept_content' => 'application/xrd+xml'));
if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
return false;
$links = xml::element_to_array($xrd);
if (!isset($links["xrd"]["link"])) {
+ logger("No xrd data found for ".$host, LOGGER_DEBUG);
return false;
}
}
if (!$lrdd) {
+ logger("No lrdd data found for ".$uri, LOGGER_DEBUG);
return array();
}
}
if (!is_array($webfinger["links"])) {
+ logger("No webfinger links found for ".$uri, LOGGER_DEBUG);
return false;
}
$addr = $uri;
} else {
+ logger("Uri ".$uri." was not detectable", LOGGER_DEBUG);
return false;
}
$webfinger = json_decode($data, true);
if (!isset($webfinger["links"])) {
+ logger("No json webfinger links for ".$url, LOGGER_DEBUG);
return false;
}
$xrd_arr = xml::element_to_array($xrd);
if (!isset($xrd_arr["xrd"]["link"])) {
+ logger("No XML webfinger links for ".$url, LOGGER_DEBUG);
return false;
}
}
$content = $ret['body'];
if (!$content) {
+ logger("Empty body for ".$noscrape_url, LOGGER_DEBUG);
return false;
}
$json = json_decode($content, true);
if (!is_array($json)) {
+ logger("No json data for ".$noscrape_url, LOGGER_DEBUG);
return false;
}