2011-09-12 02:12:34 +04:00
|
|
|
<?php
|
2011-09-12 16:15:19 +04:00
|
|
|
if($_SERVER['SCRIPT_NAME'] == '/.well-known/host-meta.php') {
|
|
|
|
header("Access-Control-Allow-Origin: *");
|
|
|
|
} else {
|
2011-09-12 16:22:48 +04:00
|
|
|
header('Please-first: activate');
|
2011-09-12 16:15:19 +04:00
|
|
|
}
|
2012-02-22 23:05:41 +04:00
|
|
|
header("Content-Type: application/xrd+xml");
|
2011-09-12 02:12:34 +04:00
|
|
|
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>
|
2012-02-22 22:04:21 +04:00
|
|
|
<Link rel="lrdd" template="http<?php echo (isset($_SERVER['HTTPS'])?'s':''); ?>://<?php echo $_SERVER['SERVER_NAME'] ?>/.well-known/webfinger.php?q={uri}">
|
2011-09-12 02:12:34 +04:00
|
|
|
</Link>
|
|
|
|
</XRD>
|
|
|
|
|