A minimal PhotoBackup API endpoint developed in PHP.
-
Easy to run. Minimal configuration and the widest possible server compatibility make this PhotoBackup implementation a great starting point!
-
Easy to review. All the code is extensively described through PSR-5 DocComments and should be easy to read along.
-
Easy to integrate. Server is written as both a standalone server and a Composer-friendly library, so it can be easily integrated into third party applications. (Composer is not required for standalone use.)
-
Download the latest release from GitHub:
-
Copy
index.php.exampletoindex.php(so your configuration will not be overwritten on upgrade). -
Open
index.phpand change the value of$Passwordto the password you want to use for PhotoBackup. Alternatively you can include external configuration file located outside document root of your web server (see example in theindex.phpfile). -
Upload everything (or at least
index.php,classfolder and thephotosfolder) to your web host. -
Make sure your web server can write to the
photosfolder. -
Configure the server address in your PhotoBackup client to match the URL for your
index.phpfile. E.g.http://example.com/photobackup/index.php.
Your configuration is stored in the index.php file which is not under version
control, therefore you can simply use Git to pull a new version and then upload
everything to your web server.
To integrate this server to your application, see the Server class in
class/Server.php. This server library can be loaded using Composer and its
PSR-4 class loader. In this case simply ignore the index.php stuff.
The PhotoBackup PHP server is licensed under the OSI version of the MIT license. It lets you do anything with the code as long as proper attribution is given. Please see LICENSE.