Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12th June 2011, 12:23
HellMind HellMind is offline
Member
 
Join Date: Jul 2008
Posts: 99
Thanks: 4
Thanked 1 Time in 1 Post
Send a message via ICQ to HellMind Send a message via MSN to HellMind
Default Creating DNS record using the remote api

Code:
<?php
$client_id = '2'; //your client id, lo ignora
$client_group_id = '3';
$domain_name = $_REQUEST['domain'];
$server =1;
$mbox='info.x.com.';
$ns='ns1.x.com';
$ip='20x.21x.2x.1x';

#-------------------
$username = 'x';
$password = 'x';

$soap_location = 'http://localhost:8080/remote/index.php';
$soap_uri = 'http://localhost:8080/remote/';

$client = new SoapClient(null, array('location' => $soap_location, 'uri'      => $soap_uri));

$session_id = $client->login($username,$password);
//Registry Add
try {
        $params = array(
                'server_id' => $server,
                'origin' => $domain_name, //replace
                'ns' => $ns,
                'mbox' => $mbox,
                'refresh' => 28800,
                'retry' => 7200,
                'expire' => 604800,
                'minimum' => 86400,
                'ttl' => 86400,
                'xfer' => "",
                'also_notify' => "",
                'update_acl' => "",
                'active' => 'y',

        );
        $client->dns_zone_add($session_id, $client_id, $params);
}
catch (SoapFault $e) {
        die('Error: '.$e->getMessage());
}
//as add
try{
        $params = array(
                'server_id' => $server,
                'name' => '*',
                'data' => $ip,
                'ttl' => 86400,
                'active' => 'y',

        );
        $client->dns_a_add($session_id, $client_id, $params);
}
catch (SoapFault $e) {
        die('Error: '.$e->getMessage());
}
echo "Agregado";
?>
With this code I can add a new soa registry but the client owner is null, it works with every client but not the one I want , which is '2'.(No error apears it just looks like if I were using Id = 0)

The second problem is to add the 'a' record I need to know the id of the soa registry, how can I get that?
__________________
Ispconfig 3 Latest Version (Stable)
Debian Squeeze (esix vm)
Reply With Quote
Sponsored Links
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix delivery problem erebus Installation/Configuration 8 29th July 2014 20:17
Google Apps dayjahone General 19 29th March 2008 17:25
ISPConfig 2.2.14 released till General 48 19th July 2007 23:46
No SPF record. beryl Installation/Configuration 6 17th May 2007 19:52
Problem with the apache (I can't start ist) M.Behrens Installation/Configuration 11 31st March 2006 10:48


All times are GMT +2. The time now is 02:30.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.