Download the PHP package genilto/sbackup without Composer

On this page you can find all versions of the php package genilto/sbackup. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sbackup

SBackup

A small way to generate and send backups to somewhere like onedrive or dropbox using PHP.

Adapters

SBackup does nothing without an adapter. Bellow are the implemented adapers until now. You need to require one of above adapters to be able to use in your project.

SBackup-Dropbox

Adapter to work with dropbox api.

https://github.com/genilto/sbackup-dropbox

SBackup-Onedrive

Adapter to work with onedrive api.

https://github.com/genilto/sbackup-onedrive

Install

To use the library you can just import to your project using composer. The very first thing is to create a folder for your project, called sbackup-example and then run the composer like below:

It will install all the dependencies you need to work with dropbox, including our SBackup library!

How to use

Below is a simple example of how you can use the library. Be creative on you own project. If you want, you can clone the examples from repository: https://github.com/genilto/sbackup-example

Test environment

To help us to easily test the application, we can use docker-composer, it's very simple to use and very fast to create an environment using the exactly php version you want.

Just be sure you have docker and docker-compose installed on your system.

Create a file named docker-compose.yml with the following content inside your project folder:

Remember to replace the \${DROPBOX_CLIENT_ID} and \${DROPBOX_CLIENT_SECRET} with your dropbox credentials.

Now create another folder called html and inside create a file called index.php with the following content:

Now you are ready to run the command bellow:

It will start a docker container, running an apache with php on http://localhost:86. If you see the SBackup Tests! page, you are ready to go ahead.

Base Configuration

Next step you need to do is to instantiate all the classes that must be injected in SBackup, and then instantiate the SBackup class. Inside the html folder, create a file called backup.config.php with the following content:

OBS: To get the Dropbox Client ID and Dropbox Client Secret you can create your APP in https://developer.dropbox.com

Now, you already have available $SBackup object to work with your backups!

Authentication

Next step is to create a page that allows you to authenticate the program to your account in dropbox. For that, you can create a new file inside html folder, called auth.php, with the following content:

If you want to test the authentication right now, you can navigate to http://localhost:86/auth.php

There you must follow the instructions.

Upload

If you have followed all the steps bellow, now you are ready for upload files to dropbox. For that you can create another file named upload.php inside the html folder, with the following content:


All versions of sbackup with dependencies

PHP Build Version
Package Version
Requires psr/log Version ^1.0.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package genilto/sbackup contains the following files

Loading the files please wait ....