File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ // Composer autoloading
3+ if (file_exists (__DIR__ . '/vendor/autoload.php ' )) {
4+ $ loader = include __DIR__ . '/vendor/autoload.php ' ;
5+ }
6+
7+ use ZendService \Gandi \Gandi ;
8+
9+ try {
10+ $ gandi = new Gandi ();
11+
12+ $ apiKey = 'xxxxxxxxxx ' ;
13+
14+ // account info
15+ print_r ($ gandi ->account ->info (array ($ apiKey )));
16+
17+ // PASS vhost list
18+ print_r ($ gandi ->paas ->vhost ->list (array ($ apiKey )));
19+
20+ // PASS vhost info
21+ print_r ($ gandi ->paas ->vhost ->info (array ($ apiKey , 'github.narno.org ' )));
22+
23+ // PASS create (generic) vhost
24+ print_r ($ gandi ->paas ->vhost ->create (array (
25+ $ apiKey ,
26+ array (
27+ 'paas_id ' => 00000 ,
28+ 'vhost ' => time () . '.narno.org ' ,
29+ 'override ' => false ,
30+ 'zone_alter ' => true ,
31+ )
32+ )));
33+ } catch (Exception $ e ) {
34+ echo $ e ->getMessage ();
35+ }
You can’t perform that action at this time.
0 commit comments