<?php
$username = 'ftpusername';
$password = 'ftppassword';
$hostname = 'ftp.servername.com';
$targetDirectory = '/public_html/';
$testMode = true; // This could be read from command line
$changeset = 88; // This could be read from command line
require_once dirname ( __FILE__ ) . '/DeployChangeset.php';
$deploy = new DeployChangeset ( $targetDirectory, $testMode );
echo "\nTestmode: " . ( ( $testMode ) ? 'true' : 'false' );
echo "\nDiscovering changeset...";
$result = $deploy->findChangeset ( $changeset );
echo "Actioning: \n";
print_r ( $result );
echo "\nConnectinng...";
if ( ( $result = $deploy->connect ( $hostname, $username, $password ) ) === true ) {
echo "Success!\n";
$deploy->action ( true );
echo "\nDisconnecting...";
$deploy->disconnect ();
}
else {
echo $result;
}
echo "\nDone";
|