5212e99420a974c3d61b62dd9bca354a7ec8e061
[phancap.git] / www / get.php
1 <?php
2 namespace phancap;
3 /**
4  * Get a screenshot for a website.
5  */
6 if (file_exists(__DIR__ . '/../src/phancap/Autoloader.php')) {
7     include_once __DIR__ . '/../src/phancap/Autoloader.php';
8     Autoloader::register();
9 } else {
10     include_once 'phancap/Autoloader.php';
11 }
12
13 $options = new Options();
14 try {
15     $options->parse($_GET);
16 } catch (\InvalidArgumentException $e) {
17     header('HTTP/1.0 400 Bad Request');
18     header('Content-type: text/plain');
19     echo $e->getMessage();
20     exit(1);
21 }
22
23 var_dump($options->values);
24 ?>