diff options
author | Matt Lee <mattl@cnuk.org> | 2010-08-07 14:29:24 -0400 |
---|---|---|
committer | Matt Lee <mattl@cnuk.org> | 2010-08-07 14:29:24 -0400 |
commit | 66051a4799d64288ba7a606e470b1cb663dca244 (patch) | |
tree | 1814aad6477b999ab1382ee64574a201c07c3d99 /socialfy-your-domain/xrd | |
parent | 762731d8ee2ff2b8a8aa0c6f92335dd802baf536 (diff) |
added some crude code to enable people to add support for webfinger to
their domains
license: AGPLv3 or later.
Diffstat (limited to 'socialfy-your-domain/xrd')
-rw-r--r-- | socialfy-your-domain/xrd/example@example.com | 14 | ||||
-rw-r--r-- | socialfy-your-domain/xrd/index.php | 41 |
2 files changed, 55 insertions, 0 deletions
diff --git a/socialfy-your-domain/xrd/example@example.com b/socialfy-your-domain/xrd/example@example.com new file mode 100644 index 000000000..06987525b --- /dev/null +++ b/socialfy-your-domain/xrd/example@example.com @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0"> + <Subject>acct:example@example.com</Subject> + <Alias>acct:example@social.example.com</Alias> + <Alias>http://social.example.com/user/1</Alias> + <Link rel="http://webfinger.net/rel/profile-page" type="text/html" href="http://social.example.com/user/1"/> + <Link rel="http://schemas.google.com/g/2010#updates-from" type="application/atom+xml" href="http://social.example.com/api/statuses/user_timeline/1.atom"/> + <Link rel="http://microformats.org/profile/hcard" type="text/html" href="http://social.example.com/hcard"/> + <Link rel="http://gmpg.org/xfn/11" type="text/html" href="http://social.example.com/user/1"/> + <Link rel="describedby" type="application/rdf+xml" href="http://social.example.com/foaf"/> + <Link rel="http://salmon-protocol.org/ns/salmon-replies" href="http://social.example.com/main/salmon/user/1"/> + <Link rel="http://salmon-protocol.org/ns/salmon-mention" href="http://social.example.com/main/salmon/user/1"/> + <Link rel="http://ostatus.org/schema/1.0/subscribe" template="http://social.example.com/main/ostatussub?profile={uri}"/> +</XRD> diff --git a/socialfy-your-domain/xrd/index.php b/socialfy-your-domain/xrd/index.php new file mode 100644 index 000000000..25f1d8bf3 --- /dev/null +++ b/socialfy-your-domain/xrd/index.php @@ -0,0 +1,41 @@ +<?php + +/* + * GNU social + * Copyright (C) 2010, Free Software Foundation, Inc + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + + +$s = ""; + +/* this should be a secret */ + +$u = $_GET['uri']; + +$u = substr($u, 5); + +$f = $s . $u . ".xml"; + +if (file_exists($f)) { + $fh = fopen($f, 'r'); + $c = fread($fh, filesize($f)); + fclose($fh); + header('Content-type: text/xml'); + echo $c; +} + + +?>
\ No newline at end of file |