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 <?xml version="1.0" encoding="utf-8"?>
17 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
18 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
20 <title>phancap</title>
22 <link rel="stylesheet" href="css/bootstrap.min.css"/>
23 <link rel="stylesheet" href="css/bootstrap-theme.min.css"/>
24 <link rel="stylesheet" href="css/phancap.css"/>
25 <meta name="viewport" content="width=device-width, initial-scale=1"/>
28 <div class="container">
30 <div class="col-md-2"></div>
31 <div class="col-md-8">
33 <div class="page-header">
38 <div class="col-md-6">
40 Web service to create website screenshots.
44 <div class="col-md-6">
46 <div class="panel panel-default">
47 <div class="panel-heading">Create screenshot</div>
48 <div class="panel-body">
49 <form method="get" action="./get.php" class="form-inline" role="form">
50 <div class="form-group">
51 <label for="url">URL:</label>
52 <input type="text" name="url" id="url" size="30" class="form-control"
53 placeholder="http://example.org/" />
55 <button type="submit" class="btn btn-default">Go</button>
64 <h2 id="tools">Tools</h2>
65 <ul class="list-group">
66 <li class="list-group-item">
67 <a href="setup.php">Setup check</a> to test if everything is ok
69 <li class="list-group-item">
70 <a href="README.html">README</a>
77 The API is accessible at <a href="get.php">get.php</a>.
80 <div class="panel panel-default">
81 <div class="panel-heading" style="text-align: center">Available URL parameters</div>
82 <table class="table table-striped table-bordered table-condensed">
93 $options = new Options();
94 $config = new Config();
97 $options->setConfig($config);
98 } catch (\Exception $e) {}
100 foreach ($options->options as $name => $option) {
102 . '<td><tt>' . $name . '</tt></td>'
103 . '<td>' . htmlspecialchars($option['title']) . '</td>'
106 is_array($option['type'])
107 ? ('One of: <tt>' . implode('</tt>, <tt>', $option['type']) . '</tt>')
108 : str_replace('skip', ' ', $option['type'])
111 . '<td> <tt>' . $option['default'] . '</tt></td>'
119 Ages can be given as ISO 8601 duration specification, for example:
121 <dl class="dl-horizontal">
122 <dt><tt>P1Y</tt></dt><dd>1 year</dd>
123 <dt><tt>P2W</tt></dt><dd>2 weeks</dd>
124 <dt><tt>P1D</tt></dt><dd>1 day</dd>
125 <dt><tt>PT4H</tt></dt><dd>4 hours</dd>