XMLAPI标头可能不包含多个标头,检测到新行

时间:2017-04-08 09:49:33

标签: php

我的网站错误标题可能不包含多个标题,检测到新行 https://github.com/CpanelInc/xmlapi-php 我用的是xmlapi。调用curl_query

时出错
App::import('Vendor', 'xmlapi');
$domain_name_add = $parts[0] . "." . $parts[1] . "." . $parts[2];
$sub_domain = "*";
$username = Configure::read('asdasdasx-HUY');
$password = Configure::read('hrgfsefasd-HUY');
$targetFolder = '/public_html/';
$xmlapi = new xmlapi(Configure::read('domainsite'));
$xmlapi->set_port(2083);
$xmlapi->password_auth($username, $password);
$xmlapi->set_debug(0); // or you can use 1
$xmlapi->set_output('xml'); // you can use 'json'
$args = array($sub_domain, $domain_name_add, 0, 0, $targetFolder);
$ress = $xmlapi->api2_query($username, 'AddonDomain', 'addaddondomain', array('dir' => $targetFolder, 'newdomain' => $domain_name_add, 'subdomain' => $domain_name_add));
$res = $xmlapi->api1_query($username, 'SubDomain', 'addsubdomain', $args);

标题

array(
    (int) 0 => 'Authorization: Basic Ym9va3N0cmF2ZWw6SHV5czJEdW5n
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 186

    dir=%2Fpublic_html%2F&newdomain=zingfb.cf&subdomain=zingfb.cf&cpanel_xmlapi_user=bookstravel&cpanel_xmlapi_module=AddonDomain&cpanel_xmlapi_func=addaddondomain&cpanel_xmlapi_apiversion=2'
)

0 个答案:

没有答案