openMemory(); $xml->startDocument('1.0', 'UTF-8'); $xml->startElement('mds'); $xml->startElement('auth'); $xml->writeElement('login', 'login'); $xml->writeElement('pass', 'hasło'); $xml->endElement(); $xml->startElement('request'); $xml->writeElement('type', 'offers'); $xml->startElement('conditions'); $xml->writeElement('par_adt', 2); $xml->endElement(); $xml->endElement(); $xml->endElement(); $xml->endDocument(); $xml_response_string = post_xml('http://mws.merlinx.pl/dataV4/', $xml->outputMemory(true)); if(!$xml_response_string) die('ERROR'); $xml_response = simplexml_load_string($xml_response_string); ?>