Last active
December 14, 2015 13:18
-
-
Save gecampbell/5092451 to your computer and use it in GitHub Desktop.
Sample code for updating Rackspace Cloud DNS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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