hola amigos estoy teniendo este error:
Error de lectura XML: no se encuentra elemento
Ubicación:
http://www.coriaweb.es/usuarios/email/xml.php
Número de línea 1, columna 1:
^
y no se a que se puede deber... el codigo que tengo es este:
Código PHP:
<?php
$host = 'coriaweb.es';
$port = '8443';
$path = 'enterprise/control/agent.php';
$userplesk = $_POST['uplesk'];
$passwdplesk = $_POST['pplesk'];
$useremail = $_POST['uemail'];
$passwdemail = $_POST['pemal'];
header("Content-type: text/xml");
$packet= '<?xml version="1.0" encoding="utf-8"?>
<packet version="1.6.0.0">
<mail>
<create>
<filter>
<domain_id>12</domain_id>
<mailname>
<name>'. $useremail .'</name>
<mailbox>
<enabled>true</enabled>
</mailbox>
<password>' . $passwdemail . '</password>
<password_type>crypt</password_type>
<permissions>
<cp_access>true</cp_access>
</permissions>
</mailname>
<mailname>
<name>techdept</name>
<mailbox>
<enabled>true</enabled>
</mailbox>
</mailname>
</filter>
</create>
</mail>
</packet>';
$url = 'https://'. $host .':'. $port .'/'. $path;
$headers = array(
'HTTP_AUTH_LOGIN: '. $userplesk,
'HTTP_AUTH_PASSWD: '. $passwdplesk,
'Content-Type: text/xml'
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $packet);
$retval = curl_exec($ch);
curl_close($ch);
?>
alguna idea de por que pasa eso??