document possible parameters and deps
[phancap.git] / README.rst
1 ************************************
2 phancap - website screenshot service
3 ************************************
4
5 Software to create screenshots and thumbnails of websites via an API.
6
7 Self-hosted and written in PHP. Caching included.
8
9
10 ==============
11 URL parameters
12 ==============
13 ``get.php`` supports the following parameters:
14
15 ``url``
16   Website URL
17 ``bwidth``
18   Browser width (default: 1024)
19 ``bheight``
20   Browser height (default: none)
21 ``swidth``
22   Screenshot width (default: none (no scaling))
23 ``sheight``
24   Screenshot height (default: none)
25 ``sformat``
26   Screenshot format (``png``, ``jpg``, ``pdf``, default: ``png``)
27 ``smode``
28   Screenshot mode (``screen`` (4:3) or ``page`` (full website height))
29
30
31 ============
32 Dependencies
33 ============
34 - `cutycapt <http://cutycapt.sourceforge.net/>`_
35 - imagemagick's ``convert``
36 - ``xvfb-run``
37
38
39
40 =======================
41 Technical brainstorming
42 =======================
43
44 Tools to make website screenshots
45 =================================
46 - `cutycapt <http://cutycapt.sourceforge.net/>`_
47 - `khtml2png <http://khtml2png.sourceforge.net/>`_ (outdated)
48 - `phantomjs <http://phantomjs.org/>`_
49 - `python-webkit2png <https://github.com/AdamN/python-webkit2png/>`_
50 - `wkhtmltopdf <http://code.google.com/p/wkhtmltopdf/>`_
51 - wkhtmltoimage
52
53
54 Possible parameters
55 ===================
56
57 Page request parameters
58 -----------------------
59 - url
60 - bwidth (browser width / resolution)
61 - bheight (browser height / resolution)
62 - delay (capture X seconds after page loaded)
63 - useragent (user agent header string)
64 - accepted languages (Accept-Language header)
65 - cookie (set cookie data)
66 - referer (custom referer header)
67 - post data (send POST data as if filled out a form)
68
69 Screenshot configuration
70 ------------------------
71 - width (of thumbnail)
72 - height (of thumbnail)
73 - output format (jpg, png, pdf)
74 - mode: screen or page (full page height or screen size only)
75   - page aka fullpage
76 - quality (jpeg image quality)
77
78 Misc
79 ----
80 - callback URL (to notify when screenshot is ready)
81 - sync/async (wait for response or just get a 202 accepted)
82 - cache (to force a fresh screenshot with cache=0,
83   otherwise seconds the cache may be old)
84 - api key
85 - token (md5 hash of query string)
86
87 API parameter sources
88 ---------------------
89 - http://api1.thumbalizr.com/
90 - http://url2png.com/docs/
91 - http://webthumb.bluga.net/apidoc
92 - http://www.page2images.com/Create-website-screenshot-online-API
93 - http://browshot.com/api/documentation
94
95
96 Other website screenshot services
97 =================================
98 - http://browsershots.org/
99 - http://browshot.com/
100 - http://ctrlq.org/screenshots/
101 - http://grabz.it/
102 - http://url2png.com/
103 - http://usersnap.com/
104 - http://websnapr.com/
105 - http://webthumb.bluga.net/
106 - http://www.page2images.com/
107 - http://www.shrinktheweb.com/
108 - http://www.thumbalizr.com/
109 - http://www.url2picture.com/
110
111
112 Other website screenshot software
113 =================================
114 - https://github.com/microweber/screen