4 * Check if everything is setup
6 header('HTTP/1.0 500 Internal Server Error');
8 if (file_exists(__DIR__ . '/../src/phancap/Autoloader.php')) {
9 include_once __DIR__ . '/../src/phancap/Autoloader.php';
10 Autoloader::register();
12 include_once 'phancap/Autoloader.php';
14 header('HTTP/1.0 200 OK');
16 $options = new Options();
17 $config = new Config();
20 $options->setConfig($config);
21 } catch (\Exception $e) {}
23 <?xml version="1.0" encoding="utf-8"?>
24 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
25 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
27 <title>phancap</title>
29 <link rel="stylesheet" href="css/bootstrap.min.css"/>
30 <link rel="stylesheet" href="css/bootstrap-theme.min.css"/>
31 <link rel="stylesheet" href="css/phancap.css"/>
32 <meta name="viewport" content="width=device-width, initial-scale=1"/>
35 <div class="container">
37 <div class="col-md-2"></div>
38 <div class="col-md-8">
40 <div class="page-header">
45 <div class="col-md-6">
47 Web service to create website screenshots.
51 <div class="col-md-6">
53 <div class="panel panel-default">
54 <div class="panel-heading">Create screenshot</div>
55 <div class="panel-body">
56 <?php if ($config->access === false) { ?>
57 <div class="alert alert-danger">API is disabled</div>
58 <?php } else if ($config->access !== true) { ?>
59 <div class="alert alert-warning">API requires authentication</div>
61 <form method="get" action="./get.php" class="form-inline" role="form">
62 <div class="form-group">
63 <label for="url">URL:</label>
64 <input type="text" name="url" id="url" size="30" class="form-control"
65 placeholder="http://example.org/" />
67 <button type="submit" class="btn btn-default">Go</button>
76 <h2 id="tools">Tools</h2>
77 <ul class="list-group">
78 <li class="list-group-item">
79 <a href="setup.php">Setup check</a> to test if everything is ok
81 <li class="list-group-item">
82 <a href="README.html">README</a>
89 The API is accessible at <a href="get.php">get.php</a>.
92 <div class="panel panel-default">
93 <div class="panel-heading" style="text-align: center">Available URL parameters</div>
94 <table class="table table-striped table-bordered table-condensed">
105 foreach ($options->options as $name => $option) {
107 . '<td><tt>' . $name . '</tt></td>'
108 . '<td>' . htmlspecialchars($option['title']) . '</td>'
111 is_array($option['type'])
112 ? ('One of: <tt>' . implode('</tt>, <tt>', $option['type']) . '</tt>')
113 : str_replace('skip', ' ', $option['type'])
116 . '<td> <tt>' . $option['default'] . '</tt></td>'
124 Ages can be given as ISO 8601 duration specification, for example:
126 <dl class="dl-horizontal">
127 <dt><tt>P1Y</tt></dt><dd>1 year</dd>
128 <dt><tt>P2W</tt></dt><dd>2 weeks</dd>
129 <dt><tt>P1D</tt></dt><dd>1 day</dd>
130 <dt><tt>PT4H</tt></dt><dd>4 hours</dd>