Recommend this page to a friend! |
![]() ![]() |
Info | ![]() |
![]() ![]() |
Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2021-11-22 (7 months ago) ![]() | Not yet rated by the users | Total: 127 | All time: 9,260 This week: 217![]() |
Version | License | PHP version | Categories | |||
php-dreamhost 1.0.2 | BSD License | 5.3 | PHP 5, Web services, Hosting |
Description | Author | ||||||||||||||||||||||
This class can manage Dreamhost hosting accounts using its API. |
|
PHP class for the Dreamhost API [](https://travis-ci.org/danielcosta/php-dreamhost) =============================== Interfaces with the Dreamhost API Installation ------------ Package available on [Composer](http://packagist.org/packages/danielcosta/php-dreamhost). Autoloading is [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md) compatible. Usage ----- <?php use DanielCosta\Dreamhost; $dh = new Dreamhost('your api key'[,format]); $dh->exec('command'[, array(arg => value[, ...])]); Where *__'command'__* is one of the many listed on the [Dreamhost Wiki API](http://wiki.dreamhost.com/API/Api_commands) article. Method *__'exec'__* returns either an array of associative arrays of the data returned by Dreamhost or throws an exception upon error. You can define any preferred return format by passing a second argument to class constructor. Defaults to 'json'. Example ------- <?php use DanielCosta\Dreamhost; $dh = new Dreamhost('6SHU5P2HLDAYECUM'[,format]); try { $method = 'api-list_accessible_cmds'; $commands = $dh->exec($method); // $commands = $dh->$method(); // this should also work print_r($commands); } catch (Exception $e) { echo $e->getMessage(); // contains either the error data returned by dreamhost or a curl error string and number } |
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Lic. | License text | ||
![]() ![]() |
Doc. | Documentation |
![]() |
/ | tests |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() ![]() |
Aux. | Auxiliary script | ||
![]() ![]() |
Data | Auxiliary data |
![]() |
/ | tests | / | src | / | DanielCosta | / | Dreamhost |
File | Role | Description |
---|---|---|
![]() ![]() |
Test | Unit test script |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.