Last active
December 29, 2015 11:09
-
-
Save gecampbell/7661597 to your computer and use it in GitHub Desktop.
Programmable 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