-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
67 lines (51 loc) · 2.08 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
--------------------
1. Description
--------------------
This is basically a script set, that will allow you to create
a screenshot and send it to a remote server, using file
upload in PHP.
Why PHP and not SCP/SFTP, one will ask? Feel free to rewrite
the code, and make it use SSH, if you wish so. I use PHP for
two reasons:
* not all hosting providers will give you access to SSH, but
most of them will give you PHP
* i remember having issues with fail2ban/sshguard, when I've
been sending many screenshots in a short peroid of time.
Those scripts thought I was a potential attacker and cut
me off for a while.
--------------------
2. Usage
--------------------
I have divided the script in to two parts - the client, and
the server, and it's quite obvious which one is for what.
You need to configure both the client, and the server,
providing a valid username/password used to upload your
screenshots.
The client has following configuration settings:
_USER - the user name, can be anything alphanumerical
_PASSWORD - the password, same as above
_URL - your website, with a trailing slash (here is
the upload.php script)
_IMGPATH - the path to your images, relative to the
website docroot.
_COMPRESSION - the compression level for your screenshots, as
they are JPG files. A value between 1 and 100.
On the server side you need to configure your user name,
password, and images path. You also need to create the images
directory, and upload the script (it's quite obvious).
I personally use gnome, and I have made a panel launcher, that
will create and send a screenshot with one click, whenever I
want.
--------------------
2. Requirements
--------------------
Actually, I don't know what is the minimal version required to work,
but since it's mostly used on desktops, I can assume that most people
will have recent version enough.
Client:
* bash (scripting)
* scrot (creating the screenshot)
* curl (sending the screenshot)
* zenity (rendering a notification, with a clickable URL)
Server:
* PHP 5.2+