Well I'm with the curl up and running. I'm trying to integrate with the site: link method getplanos.
I send the xml via curl and returns that the parameters were not informed
Name: GetPlanos (available)
Purpose: To return all available plans.
Request Parameters: Login, Password
Response Parameters: Plan Code, Plan Name
example: link
$input_xml="<?xml version='1.0' encoding='UTF-8' ?>
<requisicao>
<login>xml28</login>
<senha>15028</senha>
</requisicao>";
$url = 'https://www.affinityassistencia.com.br/ws/getPlanosLista/';
//setting the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
// Following line is compulsary to add as it is:
curl_setopt($ch, CURLOPT_HTTPHEADER,
array('Content-type: application/xml',
'Content-length: '. strlen($input_xml)) );
curl_setopt($ch, CURLOPT_POSTFIELDS,
$input_xml);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERPWD, "xml28:15028");
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 300);
$data = curl_exec($ch);
curl_close($ch);
//convert the XML result into array
// $array_data = json_decode(json_encode(simplexml_load_string($data)), true);
print_r('<pre>');
print_r($data);
print_r('</pre>');
And then does anyone have any suggestions? Att Gustavo