Make it possible to run indieauth-openid as .phar
[indieauth-openid.git] / www / about.php
1 <?php
2 if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) {
3     $prot = 'https';
4 } else {
5     $prot = 'http';
6 }
7 $epUrl = $prot . '://' . $_SERVER['HTTP_HOST'] . '/';
8 if (Phar::running()) {
9     $epUrl .= ltrim($_SERVER['SCRIPT_NAME'], '/') . '/';
10 }
11 $hepUrl = htmlspecialchars($epUrl);
12
13 ?>
14 <?xml version="1.0" encoding="utf-8"?>
15 <html xmlns="http://www.w3.org/1999/xhtml">
16  <head>
17   <title>IndieAuth-OpenID proxy</title>
18   <style type="text/css">
19 body {
20     max-width: 80ex;
21     margin-left: auto;
22     margin-right: auto;
23 }
24 pre {
25     margin-left: 2ex;
26     background-color: #DDD;
27     padding: 1ex;
28     border-radius: 1ex;
29 }
30 tt {
31     background-color: #DDD;
32     padding: 0.2ex 0.5ex;
33 }
34   </style>
35
36  </head>
37  <body>
38   <h1>IndieAuth to OpenID proxy</h1>
39   <p>
40    This software make it possible to use your OpenID to login
41    to IndieAuth-enabled websites.
42   </p>
43
44
45   <h2 id="setup">Setup</h2>
46   <p>
47    On your home page, add the following code to the
48    HTML <tt>&lt;head&gt;</tt> section:
49   </p>
50   <pre>&lt;link rel="authorization_endpoint" href="<?php echo $hepUrl; ?>" /&gt;</pre>
51   <p>
52    Now simply enter your homepage URL in the IndieAuth login field
53    and press return.
54    You'll be redirected to your OpenID provider and see its login prompt.
55   </p>
56
57   
58   <h2 id="source">About indieauth-openid</h2>
59   <p>
60    <em>indieauth-openid</em> was written by
61    <a href="http://cweiske.de/">Christian Weiske</a>
62    and is licensed under the
63    <a href="http://www.gnu.org/licenses/agpl.html">AGPL v3 or later</a>.
64   </p>
65   <p>
66    You can get the source code from
67    <a href="http://git.cweiske.de/indieauth-openid.git">git.cweiske.de/indieauth-openid.git</a>
68    or the
69    <a href="https://github.com/cweiske/indieauth-openid">mirror on Github</a>.
70   </p>
71
72  </body>
73 </html>