2011-10-09 15:12:16 +00:00
|
|
|
<?php
|
2012-04-02 15:12:52 +00:00
|
|
|
$hostMetaHeader = array(
|
|
|
|
'Access-Control-Allow-Origin' => '*',
|
2012-05-11 13:27:11 +00:00
|
|
|
'Content-Type' => 'application/xrd+json'
|
2012-04-02 15:12:52 +00:00
|
|
|
);
|
2012-03-30 19:35:09 +00:00
|
|
|
$serverName = $_SERVER['SERVER_NAME'];
|
2012-05-17 19:03:06 +00:00
|
|
|
$hostMetaContents = '{"links":[{"rel":"lrdd","template":"http'.(isset($_SERVER['HTTPS'])?'s':'').'://'.$serverName.'/public.php?service=webfinger&q={uri}"}]}';
|
2012-04-02 15:12:52 +00:00
|
|
|
foreach($hostMetaHeader as $header => $value) {
|
2012-05-11 08:47:42 +00:00
|
|
|
header($header . ": " . $value);
|
2012-04-02 15:12:52 +00:00
|
|
|
}
|
2012-05-11 08:47:42 +00:00
|
|
|
echo $hostMetaContents;
|