*/
public static function detect($url)
{
- /// @Todo:
- // - Pleroma version number
-
$serverdata = [];
// When a nodeinfo is present, we don't need to dig further
$ret = DBA::update('gserver', $serverdata, ['nurl' => $serverdata['nurl']]);
}
- print_r($serverdata);
-
return $ret;
}
if (!empty($serverdata['version']) && preg_match('/.*?\(compatible;\s(.*)\s(.*)\)/ism', $serverdata['version'], $matches)) {
$serverdata['platform'] = $matches[1];
$serverdata['version'] = $matches[2];
-print_r($serverdata);
}
if (!empty($serverdata['version']) && strstr($serverdata['version'], 'Pleroma')) {
continue;
}
}
-//print_r($attr);
+
if ($attr['name'] == 'description') {
$serverdata['info'] = $attr['content'];
}
continue;
}
}
-//print_r($attr);
if ($attr['property'] == 'og:site_name') {
$serverdata['site_name'] = $attr['content'];
$serverdata['platform'] = 'friendica';
$serverdata['network'] = $network = Protocol::DFRN;
$serverdata['version'] = $curlResult->getHeader('x-friendica-version');
-
- } else {
-//print_r($curlResult->getHeaderArray());
}
return $serverdata;
}