diff options
author | Friendika <info@friendika.com> | 2011-03-19 01:19:11 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-03-19 01:19:11 -0700 |
commit | 7e33c1072a4a948941e2522afe0123899b0abddd (patch) | |
tree | c4c540e85b9c0b17f0a44cfc3d82bafb6bd0dad6 /boot.php | |
parent | 5034d7333eb849e9204d451a496f4fe2e019de62 (diff) | |
download | volse-hubzilla-7e33c1072a4a948941e2522afe0123899b0abddd.tar.gz volse-hubzilla-7e33c1072a4a948941e2522afe0123899b0abddd.tar.bz2 volse-hubzilla-7e33c1072a4a948941e2522afe0123899b0abddd.zip |
stuff to make connecting to diaspora profiles easier
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -1603,9 +1603,15 @@ function lrdd($uri) { if(! function_exists('fetch_lrdd_template')) { function fetch_lrdd_template($host) { $tpl = ''; - $url = 'http://' . $host . '/.well-known/host-meta' ; - $links = fetch_xrd_links($url); -logger('template: ' . print_r($links,true)); + + $url1 = 'https://' . $host . '/.well-known/host-meta' ; + $url2 = 'http://' . $host . '/.well-known/host-meta' ; + $links = fetch_xrd_links($url1); + logger('template (https): ' . print_r($links,true)); + if(! count($links)) { + $links = fetch_xrd_links($url2); + logger('template (http): ' . print_r($links,true)); + } if(count($links)) { foreach($links as $link) if($link['@attributes']['rel'] && $link['@attributes']['rel'] === 'lrdd') |