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
15 - Supports the ``mm`` fallback image (mystery man)
17 __ http://wiki.libravatar.org/api/
24 1. Copy ``data/surrogator.config.php.dist`` to ``data/surrogator.config.php``
25 (remove the ``.dist``)
26 2. Adjust the config file to your needs
27 3. Create a default image and put it into the raw folder, name it ``default.png``
28 4. Setup your web server and set the document root to the ``www/`` directory.
29 Make sure you allow the ``.htaccess`` file and have ``mod_rewrite`` activated.
30 5. Add DNS entries for ``_avatars._tcp`` and ``_avatars-sec._tcp``.
31 A bind config file excerpt would look like this::
33 _avatars._tcp.example.org. IN SRV 0 0 80 avatars.example.org
34 _avatars-sec._tcp.example.org. IN SRV 0 0 443 avatars.example.org
36 This makes the avatar server ``avatars.example.org`` responsible for
37 the domain ``example.org``, on ports 80 (HTTP) and 443 (HTTPS).
39 It is possible to use an existing domain as avatar server.
40 Just copy ``avatar.php`` into its document root dir and copy the rewrite rule
41 from ``.htaccess`` into the domain's ``.htaccess`` file if one exists.
42 If not, copy the whole ``.htaccess`` file.
43 After that, you have to point the ``$cfgFile`` path at the beginning of
44 the ``avatar.php`` file to the correct location.
51 1. Put images in ``raw/`` folder.
52 Name has to be email address + image file extension, for example
53 ``foo@example.org.png``.
54 Surrogator supports ``.png`` and ``.jpg``.
55 2. Run ``php surrogator.php``.
56 The small files get generated.
57 3. You will get more information with ``-v``
58 4. When you run ``surrogator.php`` again, it will only generate small files
59 when the raw file is newer than the "square" file in the var folder.
60 You can force the update with ``--force``.
67 To check if everything is setup correctly, try the following tools:
69 - `Libravatar domain check tool`__ for DNS resolution tests
70 - `Libravatar server check tool`__ for image resolving tests
72 __ https://www.libravatar.org/tools/check_domain
73 __ https://www.libravatar.org/tools/check
75 See the libravatar wiki about `running a custom server`__ and
76 the `API specification`__ for more information.
78 __ http://wiki.libravatar.org/running_your_own/
79 __ http://wiki.libravatar.org/api/
85 Surrogator is licensed under the `AGPL v3`__ or later.
87 __ http://www.gnu.org/licenses/agpl.html
93 Written by Christian Weiske, cweiske@cweiske.de