PHP code example of wbadrh / git-dl
1. Go to this page and download the library: Download wbadrh/git-dl 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/ */
wbadrh / git-dl example snippets
$git = new GitDownload('/your/downloads');
$author = 'drhino';
$repository = 'git-dl';
$branch = 'master';
$path = $git->clone($author, $repository, $branch);
// Prints: 'Saved to: /your/downloads/drhino/git-dl'
echo "Saved to: $path";