aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-01-28 19:49:56 -0800
committerfriendica <info@friendica.com>2014-01-28 19:49:56 -0800
commitd970c69f91b96b3ef40752a95ecec8ca8b11b62a (patch)
treeaa2f3e20127655ac323f75377380458eeaa49488 /include
parentcc11535e34f1cc91251d7ca3f38ef38997774857 (diff)
downloadvolse-hubzilla-d970c69f91b96b3ef40752a95ecec8ca8b11b62a.tar.gz
volse-hubzilla-d970c69f91b96b3ef40752a95ecec8ca8b11b62a.tar.bz2
volse-hubzilla-d970c69f91b96b3ef40752a95ecec8ca8b11b62a.zip
online indication to the directory popup
Diffstat (limited to 'include')
-rw-r--r--include/identity.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/identity.php b/include/identity.php
index ee289495d..2db5d8ece 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -1170,3 +1170,25 @@ function get_online_status($nick) {
return $ret;
}
+
+
+function remote_online_status($webbie) {
+
+ $result = false;
+ $r = q("select * from hubloc where hubloc_addr = '%s' limit 1",
+ dbesc($webbie)
+ );
+ if(! $r)
+ return $result;
+
+ $url = $r[0]['hubloc_url'] . '/online/' . substr($webbie,0,strpos($webbie,'@'));
+
+ $x = z_fetch_url($url);
+ if($x['success']) {
+ $j = json_decode($x['body'],true);
+ if($j)
+ $result = (($j['result']) ? $j['result'] : false);
+ }
+ return $result;
+
+}