5 Simple open source Libravatar__ compatible avatar image server written in PHP.
9 - Delivers images for email addresses
11 - No graphics processing is done on the server, keeping the CPU load low.
12 All avatar images get pre-generated for a set of sizes
13 - If no image at the user requested size is found, the next larger image gets
16 __ http://wiki.libravatar.org/api/
23 1. Copy ``data/surrogator.config.php.dist`` to ``data/surrogator.config.php``
24 (remove the ``.dist``)
25 2. Adjust the config file to your needs
26 3. Create a default image and put it into the raw folder, name it ``default.png``
27 4. Setup your web server and set the document root to the ``www/`` directory.
28 Make sure you allow the ``.htaccess`` file and have ``mod_rewrite`` activated.
29 5. Add DNS entries for ``_avatars._tcp`` and ``_avatars-sec._tcp``.
30 A bind config file excerpt would look like this::
32 _avatars._tcp.example.org. IN SRV 0 0 80 avatars.example.org
33 _avatars-sec._tcp.example.org. IN SRV 0 0 443 avatars.example.org
35 This makes the avatar server ``avatars.example.org`` responsible for
36 the domain ``example.org``, on ports 80 (HTTP) and 443 (HTTPS).
38 It is possible to use an existing domain as avatar server.
39 Just copy ``avatar.php`` into its document root dir and copy the rewrite rule
40 from ``.htaccess`` into the domain's ``.htaccess`` file if one exists.
41 If not, copy the whole ``.htaccess`` file.
42 After that, you have to point the ``$cfgFile`` path at the beginning of
43 the ``avatar.php`` file to the correct location.
50 1. Put images in ``raw/`` folder.
51 Name has to be email address + image file extension, for example
52 ``foo@example.org.png``.
53 Surrogator supports ``.png`` and ``.jpg``.
54 2. Run ``php surrogator.php``.
55 The small files get generated.
56 3. You will get more information with ``-v``
57 4. When you run ``surrogator.php`` again, it will only generate small files
58 when the raw file is newer than the "square" file in the var folder.
59 You can force the update with ``--force``.
66 To check if everything is setup correctly, try the following tools:
68 - `Libravatar domain check tool`__ for DNS resolution tests
69 - `Libravatar server check tool`__ for image resolving tests
71 __ https://www.libravatar.org/tools/check_domain
72 __ https://www.libravatar.org/tools/check
78 Surrogator is licensed under the `AGPL v3`__ or later.
80 __ http://www.gnu.org/licenses/agpl.html
86 Written by Christian Weiske, cweiske@cweiske.de