Skip to content

Instantly share code, notes, and snippets.

@gecampbell
Last active December 14, 2015 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gecampbell/5092451 to your computer and use it in GitHub Desktop.
Save gecampbell/5092451 to your computer and use it in GitHub Desktop.
Sample code for updating Rackspace Cloud DNS
<?php
require '/path/to/rackspace.php';
$DOMAIN_EMAIL = 'something@example.com';
// establish our credentials
$cloud = new OpenCloud\Rackspace(RACKSPACE_US,
array('username' => $USERNAME, 'apiKey' => $APIKEY ));
// connect to the DNS service
$dns = $cloud->DNS();
// get a list of domains
$dlist = $dns->DomainList();
while($domain = $dlist->Next()) {
$domain->Update(array('emailAddress'=>$DOMAIN_EMAIL));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment