2011-09-11 22:12:34 +00:00
|
|
|
<?php
|
2011-09-12 12:15:19 +00:00
|
|
|
if($_SERVER['SCRIPT_NAME'] == '/.well-known/host-meta.php') {
|
|
|
|
header("Access-Control-Allow-Origin: *");
|
|
|
|
} else {
|
|
|
|
header('Please visit /apps/user_webfinger/activate.php first');
|
|
|
|
}
|
2011-09-11 22:12:34 +00:00
|
|
|
header("Content-Type: application/xml+xrd");
|
|
|
|
echo "<";
|
|
|
|
?>
|
|
|
|
?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0" xmlns:hm="http://host-meta.net/xrd/1.0">
|
|
|
|
<hm:Host xmlns="http://host-meta.net/xrd/1.0"><?php echo $_SERVER['SERVER_NAME'] ?></hm:Host>
|
2011-09-11 23:22:40 +00:00
|
|
|
<Link rel="lrdd" template="http<?php echo ($_SERVER['HTTPS']?'s':''); ?>://<?php echo $_SERVER['SERVER_NAME'] ?>/.well-known/webfinger.php?q={uri}">
|
2011-09-11 22:12:34 +00:00
|
|
|
</Link>
|
|
|
|
</XRD>
|
|
|
|
|