Connecting to the Dynect API via PHP / CodeIgniter
Go to file
2010-12-31 01:15:07 -07:00
system Readme, cleanup 2010-12-31 01:15:07 -07:00
user_guide Initial commit 2010-12-31 01:05:08 -07:00
index.php Initial commit 2010-12-31 01:05:08 -07:00
license.txt Initial commit 2010-12-31 01:05:08 -07:00
README.markdown Readme, cleanup 2010-12-31 01:15:07 -07:00

CodeIgniter-Dynect API

Connect to the Dynect API with CodeIgniter (PHP)

Installation

  1. Copy system/application/libraries/Dynect_API.php to your application/libraries folder
  2. Review the sample code in system/application/controllers/welcome.php

Config

Usage

First, load the library and instantiate the class.

$this->load->library('Dynect_API');
$dyn = new Dynect_API();

Then, login. Make sure to logout at the end.

$dyn->login();
// do things
$dyn->logout();	

What you do is up to you. Here's what I've written so far:

print_r($dyn->get_all_records('foobo.com','test.foobo.com'));
print_r($dyn->get_zones());
print_r($dyn->create_zone("feebeetest1.com", "admin@feebeetest1.com", 3600));
print_r($dyn->publish_zone("feebeetest1.com"));
print_r($dyn->delete_zone("feebeetest1.com"));
print_r($dyn->get_records('A','foobo.com','test.foobo.com'));
print_r($dyn->create_record('A', 'feebeetest1.com', 'test.feebeetest1.com', array('address' => '127.0.0.1')));
print_r($dyn->delete_records('A', 'foobo.com', 'test.foobo.com'));