PHP code example of watchfulli / xcloner-core

1. Go to this page and download the library: Download watchfulli/xcloner-core library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

watchfulli / xcloner-core example snippets



define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', true);

ings in format [{'option_name':'value', {'option_value': 'value'}}]
$json_config = json_decode(file_get_contents(__DIR__ . '/standalone_backup_trigger_config.json'));

if (!$json_config) {
    die('Could not parse default JSON config, i will shutdown for now...');
}

//pass json config to Xcloner_Standalone lib
$xcloner_backup = new watchfulli\XClonerCore\Xcloner_Standalone($json_config);

$xcloner_backup->start($profile['id']);