PHP code example of holisticagency / satis-http-client
1. Go to this page and download the library: Download holisticagency/satis-http-client 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/ */
holisticagency / satis-http-client example snippets
use holisticagency\satis\utilities\SatisHttpClient;
//Open repository
$client = new SatisHttpClient('http://domain.tld');
//Private repository (recommanded)
$client = new SatisHttpClient('http://domain.tld', array('user', 'password'));
//Retrieve the configuration
echo $client->getFile()->status()."\n";
echo $client->body()."\n";
// ...Code to eventually modify the configuration
// Update the configuration
echo $client->putFile()->status()."\n";
// ...Build a repository locally
// Update the repository with a bundled archive zip file
echo $client->putBundleZip($zipPath)->status()."\n";
// ...or put files one by one
echo $client->putDir($workingDir)->status()."\n";