View Single Post
  #20  
Old 29th October 2008, 05:59
dayjahone dayjahone is offline
Senior Member
 
Join Date: Jan 2007
Posts: 417
Thanks: 31
Thanked 0 Times in 0 Posts
Default

I wasn't sure where to put it, but here is what I have now in my test file:

Code:
<?php

/**
* ISPConfig Soap Connector
* Version 1.3
* (c) Projektfarm GmbH 2005
*
* This script requires PHP with CURL extension
*
*/

include("soap.lib.php");

// Insert here your 42go Server
$server_url = "https://server1.mydomain.com:81";

// creating object for nusoap_client
$nusoap_client = new nusoap_client($server_url.'/remote/index.php');

// Username and Password of the remoting user (not identical
// with the user to log into the web interface!)

$parameters = array('user' => 'roach',
                    'pass' =>  'two');

// Login into 42go Server
$session_id = $nusoap_client->call('login',$parameters);

// Error Check
if($err = $nusoap_client->getError()) die("Error: ".$err);

/*
// Get Reseller List
$params = array (	'sid'       => $session_id,
                    'module'	=> 'reseller',
                    'function'	=> 'reseller_list',
                    'params'    => '');


$reseller_list = $nusoap_client->call('service',$params);
// Error Check
if($err = $nusoap_client->getError()) die("Error: ".$err);
print_r($reseller_list);
*/

/*
// Get Reseller
$params = array (	'sid'        => $session_id,
                    'module'     => 'reseller',
                    'function'   => 'reseller_get',
                    'params'     => array ( reseller_title => "Reseller1"));


$reseller = $nusoap_client->call('service',$params);
// Error Check
if($err = $nusoap_client->getError()) die("Error: ".$err);
print_r($reseller);
*/


// Adding a reseller
$params = array ( 'sid'      => $session_id,
                  'module'   => 'reseller',
                  'function' => 'reseller_add',
                  'params'   => array (         reseller_title => 'Reseller1',
                                firma => 'Reseller4',
                                vorname => 'Jens',
                                limit_user => '50',
                                limit_disk => '1000',
                                limit_web => '10',
                                limit_domain => '10',
                                name => 'Jensen',
                                strasse => 'Hauptstr. 1',
                                plz => '12345',
                                ort => 'Hauptstadt',
                                telefon => '0511 5469766',
                                fax => '0511 9799655',
                                email => 'test@hostobserver.com',
                                internet => 'http://www.reseller4.tld',
                                reseller_user => 'reseller4',
                                reseller_passwort => 'huhu',
                                anrede => 'Herr',  // Herr, Frau, Firma
                                land => 'Deutschland',
                                limit_httpd_include => '1',
                                limit_dns_manager => '1',
                                limit_domain_dns => '50',
                                province => 'Niedersachsen',
                                limit_shell_access => '0',
                                limit_cgi => '1',
                                limit_php => '1',
                                limit_ssi => '1',
                                limit_ftp => '1',
                                limit_mysql => '1',
                                limit_ssl => '1',
                                limit_anonftp => '1',
                                limit_standard_cgis => '1',
                                limit_wap => '1',
                                limit_error_pages => '1',
                                limit_frontpage => '0',
                                limit_mysql_anzahl_dbs => '100',
                                limit_slave_dns => '50',
                                client_salutatory_email_sender_email => '',
                                client_salutatory_email_sender_name => '',
                                client_salutatory_email_bcc => '',
                                client_salutatory_email_subject => '',
                                client_salutatory_email_message => '',
                                standard_index => '',
                                user_standard_index => ''
                                ));

echo '<h2>Request</h2>';
echo '<pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2>';
echo '<pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';

$reseller_id = $nusoap_client->call('service',$params);
if($err = $nusoap_client->getError()) die("Error: ".$err);
print_r($reseller_id);
...and...

I now get the same error:

Code:
Error: Response not of type text/xml: text/html
I put it at the very end...same error.

Last edited by dayjahone; 29th October 2008 at 06:04.
Reply With Quote