A este web services: http://200.27.180.194:8053/WS_Landin...ndingPage.asmx
Usando este script:
Código HTML:
<?Php require "config.php"; //echo "Hola"; ////////////////////////////////////// $sql="SELECT DATE_FORMAT(FROM_UNIXTIME(submit_time), '%b %e, %Y %l:%i %p') AS Submitted, MAX(IF(field_name='rut', field_value, NULL )) AS 'rut', MAX(IF(field_name='nombre', field_value, NULL )) AS 'nombre', MAX(IF(field_name='apellido', field_value, NULL )) AS 'apellido', MAX(IF(field_name='correo', field_value, NULL )) AS 'correo', MAX(IF(field_name='telefonomovil', field_value, NULL )) AS 'telefonomovil', MAX(IF(field_name='carrera', field_value, NULL )) AS 'carrera' FROM wp_cf7dbplugin_submits WHERE form_name = 'General' GROUP BY submit_time ORDER BY submit_time DESC"; $str ="<?xml version=\"1.0\" ?>"; //$str .="<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"; $str .="<soap12:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap12=\"http://www.w3.org/2003/05/soap-envelope\">"; //$str .="\t<soapenv:Header/>"; $str .="\n\t<soap12:Body>"; $str .="\n\t\t<CMTXUCEN_LandingPage xmlns=\"http://tempuri.org/\">"; foreach ($dbo->query($sql) as $row) { $str .= "\n\t\t\t<ContactoLanding>\n\t\t\t\t<rut>$row[rut]</rut>\n\t\t\t\t<nombre>$row[nombre]</nombre>\n\t\t\t\t<apellido>$row[apellido]</apellido>\n\t\t\t\t<correo>$row[correo]</correo>\n\t\t\t\t<telefonomovil>$row[telefonomovil]</telefonomovil>\n\t\t\t\t<CodigoCarrera>$row[carrera]</CodigoCarrera>\n\t\t\t</ContactoLanding>"; //$str .= "\n\t\t\t <tem:CodigoCarrera>$row[carrera]</tem:CodigoCarrera>\n\t\t</tem:ContactoLanding>"; } $str .="\n\t\t</CMTXUCEN_LandingPage>"; $str.= "\n\t</soap12:Body>"; $str .="\n</soap12:Envelope>"; //$str=nl2br($str); echo htmlspecialchars($str); // quitar linea si se escribe //echo $str; ///////////////////////////// /// Escribiendo el archivo //////////// $file_name="leads.xml"; // nombre del archivo $fp = fopen ($file_name, "w"); // Abre el archivo, y sino existe lo crea. fwrite ($fp,$str); // escribe fclose ($fp); // cierra chmod($file_name,0777); ?>